Fix broken support for chained orderBy(). Fixes issue #65

Also added a new testcase which test the chaining of orderBy() calls.