- add some self-diagnosis (when asserts are enabled) to check that all
features have the same nr of entries
- avoid storing pointers to mutable fields because the proto API
contract doesn't actually guarantee those stay fixed even if no further
mutation of the object occurs.