Fix __index for js objects