Fix for #1276 for version 3.26.x

**Do not merge yet, please**