Fix for the second part of #2285
Merge branch 'v1.12.x' into next