The code looks alright for changing the inplace behavior.
Do you still see the issue using this model?
Unrelated to the current issue, but you should use nn.ModuleList instead of Python lists, as the former approach will make sure to properly register all modules inside the model.