Catch cyclic dependencies and error out.