Middleware should be applied according to how they were enabled. Middleware that have been applied to specific routers should preserve that fact. It no longer is.
Commit 08fde0b is the reason why this issue exists. I had failed to test it in groups, so that's on me. Originally, it was meant for globally enabled middleware, but we have lost the locally enabled middleware.
Description
Middleware should be applied according to how they were enabled. Middleware that have been applied to specific routers should preserve that fact. It no longer is.
Commit 08fde0b is the reason why this issue exists. I had failed to test it in groups, so that's on me. Originally, it was meant for globally enabled middleware, but we have lost the locally enabled middleware.