Check the full range of badges

Changes the query so it includes the very last badge number in the
range.