Fix incorrect base state after `fd`

The solution was to make spacemacs-last-base-state variable
a buffer local variable.