Validation check on number of features in dictionary

This fixes #368
I think this requires a bit more explanation. Specifically that this is a currently enforced limitation in dictionary size, and that if you hit this a bug should be raised. Point at github issue tracker.