#3178 merged into master-2.5