BUG: fix potentially infinite recursion in VOID_nonzero. Fixes #3312.
TST: add a test for issue #3312
Merge pull request #3313 from ecatmur/master

BUG: fix potentially infinite recursion in VOID_nonzero. Fixes #3312.