In January 2012 we agreed to update our portability assumptions to include the assumption that locking a non-recursive mutexes will never fail. We haven't updated the code to remove all of the conditionals yet, but it's not really worth fixing this logic bug.