Fix a bug where PropertyRecords could get more than one PropertyBlock for a key.

The problem was that setPropertyBlock did not properly remove the exising blocks that it found.
It did correctly find the existing blocks, by their index, but then tried to remove those blocks
by understanding their index as their key.

The fix is to use the index as an index and remove the blocks by that index.
Merge pull request #1378 from systay/fix-prevent-duplicate-property-container-property-keys

Fix a bug where PropertyRecords could get more than one PropertyBlock for a key