Limit recursion for resolving package