Preserve correct order when deps are overriding