Refactored local::mutex to be standard conformant

What's the purpose of assigning an invalid id before popping?