Backport #15584 to 2014.7

Backport #15584 to 2014.7

Fixes #16307