Fix a bug being too strict about the memory block type of var dims