[TIMOB-18262] (3_5_X) Short circuit path checks on valid path

Cherry Pick PR #6520 into 3_5_X

Fixes [TIMOB-18262](https://jira.appcelerator.org/browse/TIMOB-18262)

Regression path-> KS