Fix for issue #167. Need to sort the children in the layer before rendering them to preserve their Zorder.