LIMS-1529 Error while inserting an AR

easy and hidden bug regarding to partitions calculation when using containers.