Allow rvalues to be borrowed mutably

Simpler version of PR #5974 based on the new borrow checker.