I have exactly the same problem over here. I now at least know where the corruption in the DB is, but I cannot repair it due to the violated key constraint. I really need to solve this to get the hosts configurable again.
A funky workaround for some stuff is to just select the host from the host list and use a bulk operation (e.g. change environment). That succeeds although the basic operations on the host-specific GUI fail.