I would expect the same and can still reproduce it:
model = models.resnet18()
out = model(torch.randn(1, 3, 224, 224))

loss = out.mean() * torch.log(torch.tensor(-1.))
print(loss)
loss.backward()

for name, param in model.named_parameters():
    print(name, torch.isnan(param.grad).all())

Could you post a code snippet to reproduce it?