allows once-through build and fixes deps

See comments on the main checkin.  Includes some other bugfixes  as mentioned.