fix Issue 8832 - Segfault when accessing range returned by function that...

... has delegate referencing local variables

This extends Don's earlier fix https://github.com/D-Programming-Language/dmd/pull/1554
 to cover this case as well.

Fix http://d.puremagic.com/issues/show_bug.cgi?id=8832