SERVER-8040: don't execute more js when a scope is terminated