Fix some warnings with Ruby 2.2

warning: possible reference to past scope

Conflicts:
	activerecord/test/cases/relation/mutation_test.rb