timob-12209: re-attach the JS object if it was detached when converting back to JS
Merge pull request #3711 from pingwang2011/timob-12290

timob-12209: 3_0_X Backport: TIMOB-12209