issue-266: fixed bug with null ref and modified enumerable element
Merge pull request #286 from Horusiath/dev

Bug 266: fixed bug with null ref and modified enumerable set