BHV-19877 (2.5)

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