Issue #2939724 by ryanhayes, joachim, Samvel, andrewmacpherson, sacha@wellborn.co.uk, Adam_Moulsdale, rachel_norfolk: wrong variable name in sample code (cherry picked from commit 441f198b)