Backpatching this to 12 shows yet another problem -- the topmost relation acquires additional FK constraints, not yet sure why. I think we must have fixed something in 13 that wasn't backpatched, but I can't remember what it is and whether it was intentionally not backpatched.
Looking ... -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "I can see support will not be a problem. 10 out of 10." (Simon Wittber) (http://archives.postgresql.org/pgsql-general/2004-12/msg00159.php)