KSName does not implement equals, so this method compares it correctly to a symbol.
See google/ksp#2090.