Replace this:
{{ table.columns | size | minus:1 }}
With this:
{{ table.columns | size | minus: removedCols }}