Revert "Remove deprecated use of static mutex in moodbar."

Fixes #4394

This reverts commit 7652e2f780f5ba25fd0a1282e762233b91e68426.