Xacro dependency does not work correctly in Groovy

I've had to make this fix in several places this past summer, but even after talking with the ROS infrastructure team I'm not sure what causes it.