Fixed AIOOB in robot inventory size computation.