Backport #15546 to 2014.7 branch