Change order of dependency builds to avoid picking up the wrong dependency