[xbuild] Fix handling of reference aliases