I’m sorry for this error, most of all because I’ve known about it for some time now and should definitely fix it soon. The problem is that lead tries to use some builtin Matlab functions but instead uses functions supplied with fieldtrip (part of SPM) which have the same name.
The functions in doubt should be located here:
and are called nansum, nanmean and nanvar.
A quick-fix would be to just rename these functions (maybe append a _ft to them or something temporarily) and the whole thing should work again. If you are a fieldtrip user, it might get a bit complicated since I guess that fieldtrip will need these versions for some connectivity analyses.
I will fix this issue in an update soon.