[1.6.x] Removed reference to old middleware

Backport of 0b5bafe993 from master