instruction factory: Protect global maps with a mutex