Merging the fix in SLE12 branch into 13.2 maintenance

The resulting files are fine, but the history is not 100% clean. It's not actually a big deal, but feel free to close if you think that another approach (like cherry-picking from master) is better.
It seems that the code (fix) is the very same as SLE-12 and master. Otherwise we would have to use different `version` for maintenance: 3.1.X.Y