PATCH Make named_scopes remember the current scope when defined

Hi there,

I've submitted a patch a few days ago and now it has 3 positive votes
on lighthouse. Would love some more reviews.

The patch is about named_scopes not remembering previously setted
scopes (like from a has_many assoc) when executed.


It would be great if this patch gets merged before 2.3 gets released.
Anyone from the core able to review?


Thanks rich!