Fixed race condition in Scm_Write circular-safe mode