in EntityFeature, protect position and length with flag hasLength