Reproduce fix for issue #197 in 9999-r1

Package-Manager: portage-2.2.8
Incorporate sagedoc doctest fix to 9999

Package-Manager: portage-2.2.8