Fix testing of parallel-safety of scan/join target.
Fix testing of parallel-safety of scan/join target.

In commit 960df2a971 ("Correctly assess parallel-safety of tlists when
SRFs are used."), the testing of scan/join target was done incorrectly,
which caused a plan-quality problem.  Backpatch through to v11 where
the aforementioned commit went in, since this is a regression from v10.

Author: Etsuro Fujita
Reviewed-by: Robert Haas and Tom Lane
Discussion: 8af2467297eea1a8af9c4e929f6819860342ebbf@lab.ntt.co.jp

greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,adam8157/gpdb