Disallow non-zero table idx if reference types disabled
If the reference types extension is disabled, do not allow table index in the element segment other than zero.
Here I'm not 100% sure I identified the extension right.
And considering the complexity of the ReadElemSection, I decided to just check flags !=0 at the beginning, so the error message is less precise than it could be.
Closing as stale. My understanding is that the current code with --disable-reference-types will correctly fail validation for an elem segment with a non-zero tableidx, just because the tableidx will be out of range. So I'm not sure this has to be a parse failure vs. a validation failure. Please reopen if you feel differently; I know there's a lot of interests in being able to enforce the 1.0/MVP spec.