[[ Bug 13987 ]] Implement copy on write for MCDataRef
Merge pull request #1474 from runrevali/bugfix-13987

[[ Bug 13987 ]] Implement copy on write for MCDataRef