[xbuild]: Fix conditions for <ItemGroup> inside <Target>.