Fixed to_contiguous: existing data is now copied.