Ticket #6485 - Polymorphic associations and STI

Just got bitten by this bug. http://dev.rubyonrails.org/ticket/6485

The patch fixes it for me. Could this be committed?

Cheers, Olly