Added a test for this, thanks for pointing it out. https://github.com/Shopify/liquid/commit/628ab3dc6a702d87340a6fdd9715d9ef54fab786