Prevent a recursion loop early.

Somewhat related to https://github.com/discoverygarden/islandora_solution_pack_compound/pull/2