Added mutex id caching. (issue #161)