The easiest solution should be to restore your last backup of your computer. Those problems are not easy to find, so you would save a lot of time...
Otherwise you can try to use
Process Monitor to find out what Delphi does when compiling the project and which files are read.
Sometimes you see weird paths where files with the same name exist, which were in my case caused by a component's setup which unfortunately was only available as setup (I hate this...).