Test dimnames using identical, to account for dimnames list names.