Fix the RecursiveMutex class which would never have worked before.