Rename toTerminalRef to toLocalHead