In order to fix this I just modified all local arrays to be initialized on a previous line. This also seems forwards compatible and works for my other host which is running zsh 5.2 (x86_64-apple-darwin16.0)
# before
local to_bind=(zle-line-init zle-keymap-select buffer-empty)
# after
local -a to_bind
to_bind=(zle-line-init zle-keymap-select buffer-empty)
Older versions of ZSH (pre 5.1) are unable to define local arrays in single lines.
Reproducing the issue locally:
In order to fix this I just modified all local arrays to be initialized on a previous line. This also seems forwards compatible and works for my other host which is running
zsh 5.2 (x86_64-apple-darwin16.0)
Sources: