Fix Issue 6319 - debug's relaxed purity does not apply to nested scopes
Merge pull request #1494 from yebblies/issue6319

Fix Issue 6319 - debug's relaxed purity does not apply to nested scopes