         else
           obj = {}
           obj.type = props.type
-        for own name, prop of props
+        keys = Object.keys(props)
+        for name in keys
+          prop = props[name]
+        # for own name, prop of props
           if prop instanceof Array
             obj[name] = if prop[i]? then prop[i] else prop[i%prop.length]
           else

        return null unless prop.length > 0
        if length < prop.length
          length = prop.length
    if length is 0
      # No arrays, return props as given
      return props

  # If any property of object is array, expand to a collection and fill rest
  expandToArray: (props) ->
    length = 0
    keys = Object.keys(props)
    for name in keys
      prop = props[name]
      # Short circuit with empty prop
      return null unless prop? 
      # See if any prop is an array
