A decidability theorem for a class of vector-addition systems