Debugging a view caching issue causing 500 error only in production