Automatic scope are OK in detached threads

...assuming certain conditions that should by definition be
true. So this patch amounts to improving an assert condition.
Merge branch 'master' of git://github.com/steveicarus/iverilog