Ruby's defines Hash#first via Enumerable but not Hash#last. This is a confusing behaviour, and it bubbles up to Liquid. Solution: add a special case for command-lookups of Hash#last to return hash.values.last.