Otherwise I get the following warning:
bash: export: BASH_FUNC_generate_command_executed_sequence%%=()': not a valid identifier`
It turns out I have the following variable in my environment:
BASH_FUNC_generate_command_executed_sequence%%=() { printf '\e\7' }