Fixed bug #64235 (Insteadof not work for class method in 5.4.11)

After the traits refactor, it "fixed" the traits precedence which could use class but not trait that was not intend from the design and manual.

this PR fixes the BC, and the same time deprecate the behavior.

This is a 5.4 only patch.