It is a problem if a newer ebuild is masked and you (re-)install the previous one -- it is easy mix the one to stay with the to remove. There should be a way to keep the last install ebuild version!
added emerge --safe unmerge and emerge --all clean coming up in 1.8.13