Avoid expensive for..in loops involving CMaps

This is much the same as #4804, which was abandoned.
We could avoid using the `in` operator here by changing this to: `return this._map[code] !== undefined;`.