Reconstructing ancestral character states under Wagner parsimony