Merge "Misc ordering of build rules." into idea133