Removed the recursive call from getCompositeRestrictions.
The entire thing is not the way I'm planning it to be yet.