The first line of the handler is also somewhat problematic. Namely:
[[ -x /usr/lib/command-not-found ]] || return 1
If command-not-found package is removed and this file is not, it will stop printing the message even if --no-failure-msg is removed.
The first line of the handler is also somewhat problematic. Namely:
[[ -x /usr/lib/ command- not-found ]] || return 1
If command-not-found package is removed and this file is not, it will stop printing the message even if --no-failure-msg is removed.