Use the key as a property rather than and index

ConsolidateArrayValuesByKey() currently checks the object for a $ValueKey property then tries to access the $Key as an index on the object. This fails.

Use the $Key property of the object as an index instead.
Merge branch 'master' of github.com:vanilla/vanilla