Switch orphan checking to use capability instead of model. This ensures that new-style composition providers work as intended.
This is particularly useful when a persistence failure has caused a created object not to be added to its parent container. #765