Fix various, highly dubious, cell_orientation bugs.