Fix RoundRobin memory leak, backport #1139