Fixing various reflection regressions, and fixing an API mismatch between the heap and the JVM interface.