Patch is attached. This resolves the problem reported at https://github.com/emacs-evil/evil/issues/1504