Compare func to itself, not to an equivalent function.

(This was an error in some last-moment refactoring.)