Turned out, that middleware is perfectly fine. Deploying stuff to Digital Ocean droplet I've missed to configure Nginx server correctly. On top of its configuration I've had
# Redirect root to default locale
# location = / {
# return 302 /en;
# }
So just removing that line fixed the issue and site works as expected. So always check server conf facing discrepancies between local and prod.