Integer bound regression

Fixes the regression: http://ci.djangoproject.com/job/Django/database=postgis,python=python2.7/4260/console introduced by https://github.com/django/django/commit/1506c71a95cd7f58fbc6363edf2ef742c58d2487