Various fixes for subtle bugs in virtual unit management.

 - adding included units didn't bumb child count correctly
 - the way moving worked broke due to attempting to iterate a
   lazy single-use iterable twice
 - added more tests