A few years ago, I wrote a patch to fix this problem. Upstream reported it was fixed in 22.2 but the code is actually still the same buggy line it was before. Please consider applying the patch provided on Launchpad/Github. Reproducible: Always
Added comment on upstream Github issue but given how many years it took them to do anything about it in the first place, I don't have high hopes it will be noticed.