Looking quickly at it I would say it is just a typo. As the training code does not do it.
The only thing that this would potentially change is that it can force encoder_output[0][0] to be copied in the case were it could be done inplace, but I don’t think it is the case here.