While preparing this for commit, I noticed that the expression index part of the query was disregarding attstattarget. To fix, I've modified that part to look at the index's pg_attribute entries.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных