Added SegundoBob's bug fix by hand (it had been a pull request).  This was done so as to leave LeoPyRef.leo unchanged.