Minor fix to index check in mditab_get_item

The index check in mditab_get_item is incorrect.  The index check causes an error (in 0.9.0, at least) on any SendMessage call that relies on mditab_get_item.