If a datastore is no longer accessible and you forgot to unregister the VMs, the Host Client still shows them as invalid.
Connect to the ESX via SSH and run:
vim-cmd /vmsvc/getallvms
This lists all VMs and shows the IDs <id> of the invalid ones, e.g.:
Skipping invalid VM ‘1’
You can then unregister them with:
vim-cmd /vmsvc/unregister 1
After that, the Host Client looks clean again.
Source: Reddit post