I had the same problem and the question was answered here yesterday:
> > explain select * from a where x=3;>
Try
explain select * from a where x=3::smallint;
That should do it. I opted for changing all indexed SMALLINT fields to INTEGER.