I'm curious: How did you find this bug? Did you just stumble upon it?
Does the rewritten query actually error? In other words, is your complaint strictly that deparsing is broken?
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных