LateNight-Stacked-dev: backport changes from trunk