Fix some potential negative array index reads/writes
Coverity CID 1034351, CID 1034353, CID 1034354, CID 1034352, CID 1034355, CID 1034356
Fix potential negative array index read
Coverity CID 1034502
EXPERIMENTAL Fix for potential memory corruption in zonesystem
Coverity CID 1034335