JS backend: reflection support: fixes after review