The general principle is that, if a change to file / class / element should trigger a rebuild of the other, then there should be a link between them. In this particular case, I think you'll need to associate the list of all files, even if some of them are not valid, so that in the future when some of these files become ready / valid, they'll trigger the re-build of the factory to include them.