A possible solution to the object ordering problem described here https://gist.github.com/drsnyder/9277054.