ac3: Check the array bound before dereferencing