I have a test case which demonstrates that the backtracking runtime package mask can interact badly with slot operator rebuilds, and a patch that fixes the problem.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/e59a162c00085249737df318d23a4673 https://github.com/gentoo/portage/pull/135
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c01f3fbd23def329eb1d1b0fc8f79959119a8a82
Fixed in portage-2.3.5.