Don't require in development as it causes too many restarts
Fix undefined constant errors
Fix through queries causing references to be shared between report instances