Improvements for ordering in custom exports

http://manage.dimagi.com/default.asp?86347#695228
Lines 190-192 and 216 need to be indented one more space.