Remove unnecessary `deref()`s (fixes #3586)