This was originally reported in #1661 by @timecode but mixed in with other issues, and without clear reproduction steps.
Nothing shows in the error console. Restart firefox or open a new window and steps 2-4 work as expected again.
Whenever the menu is opened and there are no commands, the submenu should immediately be disabled (not upon hover); whenever there are commands it should be enabled.
The bug is that if you hover the submenu when it is enabled but should be disabled (part 1), it never becomes enabled again (part 2).
Enable/disable the user script commands menu at the right time.