Workarounds for #19340
Remove unnecessary mut from test code