circular dependency checking