#3988 for master-2.6