CHOP-71. Fix memoization of EntityIdFactory.

Reviewed by: kiyan