 : find-row-index ( value table -- n/f )
     [ model>> value>> ] [ renderer>> '[ _ row-value ] map index ] bi ;
 
-: initial-selected-indices ( table -- n/f )
+: initial-selected-indices ( table -- {n}/f )
     {
         [ model>> value>> empty? not ]
         [ selection-required?>> ]
-        [ drop V{ 0 } ]
+        [ drop V{ 0 } clone ]
     } 1&& ;
 
 : (update-selected-indices) ( table -- {n}/f )


: draw-selected-rows ( table -- )
    {
        { [ dup selected-indices>> not ] [ drop ] }
        [
            [ selected-indices>> ] [ selection-color>> gl-color ] [ ] tri
            [ swap row-bounds gl-fill-rect ] curry each

    } 1|| ;

M: table model-changed
    nip dup update-selected-indices [ V{ } clone ] unless* {
        [ >>selected-indices f >>mouse-index drop ]
        [ [ f ] [ peek ] if-empty show-row-summary ]
        [ drop update-selected-values ]
        [ drop relayout ]
    } 2cleave ;
