Add test for circular dependency checking