Use the parent deepness only to reduce recursivity

This changes makes sure that the parent deepness will not make it more permissive then the current max deepness.

Re: #21