Remove mobile menu links if their target doesn't exist.

From #3443.