The issue seems to be in one of the very last lines of get_all_vars():
x <- setNames(as.data.frame(c(variables, extras), optional = TRUE),
This both coerces `variables` to the wrong structure (making a
three-column data frame instead of a two-column data frame) and
therefore misnames the resulting columns. I unfortunately don't know
the most sensible/general way to solve this, otherwise I would submit
a patch. Anyone know how to fix this last line?