When passing a negative value from slice it becomes the index relative to the end of the array. Not necessary anymore, since when changing entityType to use pop, the aggregateKey will then be whatever is left in the array.