Move the ScriptForbiddenScope in TreeScope::adoptIfNeeded to the top of the function.
This patch addresses the review comments and adds an automated test.
BUG=605766
Review-Url: https://codereview.chromium.org/1921853004
Cr-Commit-Position: refs/heads/master@{#390885}