Fix Issue 3672 - Read-modify-write operations should not be allowed for shared variables.
Merge pull request #3070 from AndrejMitrovic/Fix3672

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