Build file has the following at top level:
<property name="foo" value="bar.xml"/>
<import file="${foo}"/>
Quit Idea and restart. Targets in the top-level build file which depend on targets in bar.xml are red – incorrectly so, as bar.xml does contain the depended-on targets and the build runs fine.
Change top-level build file to
<import file="bar.xml"/>
Quit Idea and restart. Targets which depend on targets in bar.xml are now green.
I said "quit Idea and restart" because editing the import statement in any way (delete and retype the f in foo, for example) seems to cause Idea to reevaluate things and the same reds also go away. They reappear after quitting and restarting.