When adding source files to a Project Navigator project, if two source files share the same module name (e.g., one for synthesis/implementation and the other for simulation), the source file association is not respected. For example, a simulation-only source file might be displayed in the Synthesis/Implementation view.
In these cases, the association is typically shown incorrectly while adding files through Project -> Add Source. Even if the file association is changed to the correct association while adding sources the change is not honored.
To work around this problem, change any incorrect source file associations after the files have been added to the project. To change the associations, right click on the source file and select Properties...