AVALANCHE: Fix a couple of (theoretical) out of bounds accesses (CID 1109650)