Fix possible AttributeError in process_response()

This happens when process_request() of the other middleware
fail before DynamicSitesMiddleware is called.