Why create a new scope instead of using 

    if (Type *ti = getIndirection(t))
        mod = ti->mod;

Works in C++ and will also work in the D translation.