Fix Django 1.6 issues

Fixes an infinite recursion and a problem where db timings weren't being set.

Of note, I haven't written regression tests for these bug fixes. If this is a blocker for acceptance, I could use some help. I don't mind writing tests but I don't understand exactly what's necessary to fully test this code.