Fixes https://github.com/systemd/systemd/issues/19987 (cherry picked from commit 36ec0268)
mentioned in commit 054f8532
mentioned in commit 173d07a9