Added check here and to the chunks "Flatten" encoding.