Fail when registring the same class name twice.

Update some checks test file to respect this.
Exclude java.io.Serializable from source analysis