As far as I remember, resurrected units remain in the army if the hero has an advanced or expert-level town. Wisdom only allows you to learn higher-level spells; if the spell is on a scroll, wisdom doesn't matter. Therefore, this can be considered a bug, as wisdom shouldn't affect it. But it might have appeared as a result of game debugging.