Remove some dead code and make sure we get full mutexes.