Fix error in overload resolution checking.

Only check for redefinition with equivalent parameters,
don't include the return type.
Add internal support for shift operators.