The root cause of the problem was a bug in the implementation of
getZygoteProcessName. When the wrap.$procname approach is used, reading
/proc/cmdline produces "$procname\0/system/bin\0--application\0"... (with
embedded zero characters).
Fixed by simply not supplying length argument to the truncate call, which will
truncate to strlen(). The same bug is also present in getProcessName.