             render: { (info: RenderingInfo) in
                 if info.enumerationItem {
                     // {{# collections }}...{{/ collections }}
-                    return try info.tag.render(info.context.extendedContext(self.mustacheBoxWithValue(value, box: box)))
+                    return try info.tag.render(info.context.extendedContext(self.mustacheBoxWithArrayValue(value, box: box)))
                 } else {
                     // {{ collection }}
                     // {{# collection }}...{{/ collection }}


- returns: A MustacheBox that wraps *array*.
*/
public func Box<C: CollectionType where C.Generator.Element: MustacheBoxable, C.Index.Distance == Int>(collection: C?) -> MustacheBox {
    if let collection = collection {
        return collection.mustacheBoxWithValue(collection, box: { Box($0) })
    } else {
        return Box()
    }

// Support for Array
extension CollectionType where Index.Distance == Int, Index: BidirectionalIndexType {
    /**
    This function returns a MustacheBox that wraps an array-like collection.
    
    The returned box can be queried for the following keys:
    
    - `first`: the first object in the collection
    - `count`: number of elements in the collection
    - `last`: the last object in the collection
    
    - parameter value: the value of the returned box.
    - parameter box:   A closure that turns collection items into a MustacheBox.
                       It makes us able to provide a single implementation
                       whatever the type of the collection items.
    - returns: A MustacheBox that wraps the collection.
    */
    private func mustacheBoxWithArrayValue(value: Any?, box: (Generator.Element) -> MustacheBox) -> MustacheBox {
        return MustacheBox(
            boolValue: !isEmpty,
            value: value,
