Tweak insert() so primary keys are established prior to beforeinsert() invocation