Ensure that correct mutex is used for debug window