/close -g[color:red]N $nick[/color] closes the Nth dcc get window from $nick. With this and the newly added
$get(-1) you can probably do what you want:
on *:filercvd:*:{
var %i = 1
while $get($nick,%i).wid != $get(-1).wid { inc %i }
close -g $+ %i $nick
}
I haven't come across the bug with /window -c you were talking about, so I'm not sure that /close -g solves your problem, but it's worth a try.