Invoking Search -> Next/Previous Message via keybinding will not work if there are no open documents. cb_func_search_action() checks for an open document, and lets only Search -> Find in Files if there isn't any.
Here is a fix. It not very pretty, with multiply return-s, it would be nicer to place the doc-related code and keys in a default: case of the new switch.