Why does canonicalize call collapse after realpath?