Fix bug #21759 (second try)

I hope making a second pull request is the way to go