Fixing the error checking on quantities

I was checking the whole array against an int, not a cell in the
array against an int.  Silly Python didn't complain :(

This is likely the cause of the weirdness we've seen in a couple
of matches.  Basically you could hand it any quantity you wanted
and it wouldn't reject it.

Signed-off-by: Charlie Mooney <cmooney3@gmail.com>