rails is removing constants which it is not able to restore properly in development mode

I have updated ticket https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4149-strange-require-behavior-in-development-environment#ticket-4149-10 with my thoughts.

Would appreciate any comments on how to go about resolving the issue in dependencies.rb .