Add dimension determination for slices, if possible.