bash: Home Directory Not Replaced With Tilde (~)

After switching my computers to Arch Linux, reusing the existing home directories, I had the problem that the bash did not replace the user's home directory with the tilde character (~) in the prompt. The solutions for this problem is easy: somewhere in the bash-internals a check tests whether the output of pwd matches the contents of $HOME. $HOME, in turn, is filled from the user definition in /etc/passwd. pwd always returns the current working directory without a trailing slash, but the entry for my user in /etc/passwd contained a trailing slash. Removing this slash from the file solves the problem and the prompt uses ~ again for the home directory.