Tweaks for iOS 5, more robust handling of odd view hierarchies.