Perform correct inventory bounds checking.