Fix can and isa when called as class methods

Addresses RT#98096.