fix bug 1057012, 1079882

Replaces #2778
Sorry, I meant this is where I got stuck before. But I see you fixed it with `unprefixed=True`.