The `\displaceHeads` command from LilyPond snippet 861 doesn’t work correctly with notes that have beams – it removes the beam, probably due to a LilyPond bug (see here for details). This version can be used instead – it’s not as correct (the width of the beam is hard-coded), but it seems to work. (Only use it if you’re actually affected by this problem, of course, otherwise stick with the original!)