BHV-19913 (2.5)

Cherry-picking the changes from https://github.com/enyojs/enyo/pull/971 into `2.5-upkeep`, creating a PR for tracking purposes.