Use nested_scope? not shallow? to determine whether to copy options

The method `shallow?` returns false if the parent resource is a singleton so
we need to check if we're not inside a nested scope before copying the :path
and :as options to their shallow equivalents.

Fixes #14388.

(cherry picked from commit 924345abcff0101e3221f87d1d56d3d6517a79a4)

Conflicts:
	actionpack/CHANGELOG.md