Preserve constant variables when splitting

(this is the same behaviour as ggplot2)