Ensure `first!` and friends work on loaded associations

Fixes #18237

Conflicts:
	activerecord/CHANGELOG.md