More work on dynamic inst counting. Suspect IRbuilder call is at least correct now.