Added a hack to delete permissions for the application group, so we can delete the group when deleting the subsite instance. We really ought to make permissions cascade. but that's a much bigger fix.
You can once again mount/dismount subsites and delete of subsite works in the simple case (i.e. when you've deleted everything you've added to it via the site map or group/user/relseg admin UI)