That works fine. I note that it doesn't update the CueClef stencil to
match, but I guess similar code to the Clef update given would suffice
(if felt necessary at all!).
Your correction raises a question in my mind (which may or may not have
helped here): is there anywhere a list of dates of release of the
various stable versions (at least) of LilyPond? Many old snippets
benefit from, or require, updating because of changes; and when they
don't specify the version used, but have a date, a reference list would
enable us to put in an appropriate version statement so that we could
run an update on the code.