Ticket 1471

Fixes #1471 , naturally. I forgot to checkout main before switching to this branch, though, which is why there are two more commits than necessary. Sorry about that.