Clear the @setcmds list before each iteration of the loop that invokes callRPC.
Note that it might be the case that the callRPC should be outside the loop as it is in every other case where a list of commands is built up. But I thought this case might be special, so I left it as is. Note also that I don't think it matters because this routine is never called with more than one vlan that I could see (the loop is for each vlan).
Showing with 2 additions and 1 deletion