Fix Issue 11939 - selective imports inside a scope(failure) block cause compiler segfault