I think this is probably the same side effect that causes
insert rules using NEW.<nextvalcol> to increment and put
different values in a master and detail table. IIRC,
when it sees the new.idnum in your rule anywhere it sees
the nextval(...) not the value and will call nextval again.
I think if you search for foreign key problems and
insert rules you'll probably find posts by Tom that
probably have more details.