add duplicate checking in sc.lang.klass.refine

this commit is useful for developing classlib.