Conditionally fix meta query order

As of 3.8, This fix is no longer required. For the time being I would like to keep this around, to ensure some backwards compatability.

This PR only adds the filter on versions 3.7 and below.

Also fix some indenting.