avoid making copies of the data.frame if ordered= argument is used