I don't think this is right. `ldt` will not be correct when `A` is a `SubArray`.