[TIMOB-13528] (3_1_X) Ensure barButtonItems do not get into layoutqueue

Cherry pick PR #4146 into 3_1_X

Test is in [JIRA](https://jira.appcelerator.org/browse/TIMOB-13528)