fix bug in becomes! when changing from base to subclass. Closes #13272.

Conflicts:
	activerecord/CHANGELOG.md