Fixing lodash/underscore bug with templates that use length field