jmap: fix aliasing issues, one real testcase bug