Andreas, sorry for delay,it looks like a bug to me, could you please, share your dataset with me, so I could reproduce the behaviour.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных