Fix hash checking for __set_state