Checks for cycle dependencies