Fix bug #18516 with SIGSEGV in expand-file-name.