Just stumbled over this issue again, so I thought I might as well fix it.
Closes #1902
Contributor checklist
[x] Included tests for the changes.
[x] PR title is short, clear, and ready to be included in the user-facing changelog.
Maintainer checklist
[x] Verified one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
[x] Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).
Just stumbled over this issue again, so I thought I might as well fix it.
Closes #1902
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.