It looks like it is coughing on the redefinition of the function fired by the trigger. Both definitions will have type opaque so that makes me wonder if it is a PG bug. Peter, I'll be interested to see what you find out.
BTW HEAD is slightly whacked out at the moment. I've concentrated on getting my permissions changes into 4.6.1 - originally they were going into 4.7 but after 4.6 proved to be absolutely unscalable in the face of lots of groups and relational segments (i.e. "dotLRN") got moved to 4.6.1.
I'll be cleaning up HEAD tomorrow or Monday AM ...