Fixing middleware checks that do not work with (at least) Django 1.5 admin implementation