I'm posting this reply because this topic was the top hit in my Google search. I have found what may be a better solution.
The problem seems to be that the refid at line 14 in your original example references a definition (at line 05) that is nested inside another target (the run target).
It seems reasonable that Ant won't look for the definition in that scope.
My solution was to move the definition to the project scope (as a peer of the path definition that does work) and replace the original definition with a reference:
I hope this may help someone else who runs into the same issue.