Execute recursion only in top level to avoid cyclic dependencies