librustc: Fix by-value self.

Finally sorted this out. Fixes #5321, #4439, and #4850.