Use entrySet instead of keySet followed by a lookup per key as the former is more efficient. Issue: SPR-12363