Add a test that demonstrates the problem.
Instead of a visitor that will see all Projects, do an orderly search for the one that needs the cast.