First test for ID as the KEY of the internal array

This gives a performance boost as it avoids the loop