Add fix for rails 4.1.0 and Rails::Engine::Railtie.engines

It works with all my projects, but maybe because I have a specific case.