Fix lockup when using which-fuction-mode.