Fix some array index orderings in liquid.py