[TIMOB-15960] Fixed JS objects getting wrong values

Details in [Jira ticket](https://jira.appcelerator.org/browse/TIMOB-15960)