Rename toTerminalRef to resolveToLocalHead