You did an extra for loop. param is already a single parameter from the list stored in group_param["params"].
When you do with a tensors:
for subset in tensor:
  # Stuff

It is the same as:
for idx in range(tensor.size(0)):
    subset = tensor.select(0, idx)
    # Stuff

And since your Tensor requires gradient here, you get the result of the select operation.
For the parameters, the grad_fn will always be None and their .grad field will contain a Tensor that contains their gradient after you call .backward().