Ensure policy validated marker files are generated.

Close #2659, #2694
(cherry picked from commit 9f77d688f156d48d0f644974820623e955942019)
Ensure scope 'this' is properly restored, add unit test.

Close #2632
(cherry picked from commit 4defc519a1d22d7c4f3461b35bbaf1b9d9e3f59c)
Ensure common bundle convergence, acceptance test, Close #5222

This ensures that common bundles are converged (variable resolution) before
other types of bundles, and that promise types within common bundles
are converged in normal order.
(cherry picked from commit 074c5fb541ba06e3c256f6dbb4a2a3ae878b2fce)