Refined order of fields and projection and order clause

This is a long-standing modification, which I forgot to commit
at the time.