Issue #2989686 by msankhala, joachim, jwlockhart: documentation topic uses self:: outside of a class (cherry picked from commit 1781eeaf)