Add mux locking due to data-race test failures; VividCortex/agents#638