Fix Issue 3672 - Read-modify-write operations should not be allowed for shared variables.