Make returning JavaScript instances work in the presence of base class pointer fixups.