On Tue, 2025-04-29 at 22:21 +0700, Konstantin Kharlamov wrote: > I wrote a fix and added a test, please review. > > I did not touch the situation discussed in P.S. (should I maybe > create > a separate issue for that?), this only fixes the problem reported. v2: improved the test to cover potential edge case, clarified description.