Middleware handler iterator is now inside a middleware::Context, making it thread-safe