In the depgraph _slot_operator_update_probe method, initialization of the atom_not_selected variable can be accidentally skipped in some cases, which makes the method fail to properly identify slot operator rebuild candidates. I'll post a patch that solves the problem.
Patch send for review: https://archives.gentoo.org/gentoo-portage-dev/message/8f8b6d1803aa48fab74e6d17b6a7015e https://github.com/gentoo/portage/pull/141
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5d638cf855656afab141da8d7b4d7f66cad3450
Fixed in portage-2.3.5.