Fix bug with nested lists in `-remove-at-indices`

There is a pretty severe bug in the code I've contributed some time ago, namely `-remove-at-indices`---it breaks if applied to a list that contains lists: instead of removing the elements it will also flatten the entire list as a side effect of the implementation. This patch fixes this.

(what I wanted was to only "flatten it one level", but `-flatten` goes "all the way"... I'm thinking of adding a flatten that would only descend to a certain depth: could it be added as an optional argument to `-flatten` or do you think another function is needed?)