Since support for generator expressions was added to OUTPUT_NAME it is possible for project code to cause recursion in this method by using a $<TARGET_FILE> genex. Detect and reject such cases.