timob-12209: 3_0_X Backport: TIMOB-12209 

https://jira.appcelerator.org/browse/TIMOB-12290
Test cases in https://jira.appcelerator.org/browse/TIMOB-12209