Redo r29565, but as far as I see working now. :)