Could you print the lr_policy list after all parameters were added?
My guess is that while count is apparently being incremented in some loop, your conditions might be wrong and add the same parameter twice.
Printing all parameters in lr_policy might help debugging.