Ah, thanks Vero. I'm not using Karabiner but your comment reminded me that yes, I have remapped the lock screen keyboard shortcut using Prefs > Keyboard > App Shortcuts! Thanks for the help, I had forgotten that I had had to change the mapping for 'Lock Screen' because it conflicted with another app.
So I guess this means Alfred uses a simulated keyboard shortcut to activate the screen lock? Is there any way I can work around that? Can I customize the shortcut that Alfred triggers?