Fixes #3251: controller should be created using DI container.