Add feature list length validation to encoding/decoding logic