Issue #23867 Fix toOne path when querying on x.y when x.y.naturalKeyOfY is needed.