Why are there recovered references in my xcode project file?
From: Release Notes for Xcode 9 Beta 2:
When a project is opened, Xcode will detect if any build files in targets in the project represent file references which are not present in that project’s group tree. Any such references will be added to a file group named “Recovered References” , which will be created if necessary. These references should be manually reorganized in the project as appropriate. (22924751)
In my project I found out there's a "Recovered Reference" folder added to the project. It held references to files I recently deleted manually, and it existed only in the project (not on disk). Probably It happened as a result of deleting those files manually from disk before removing them from the Compile Sources. Even though I fixed it later, those files were stuck there.
Solution was to delete the whole folder (Right click on it -> Delete)