Fixed elementClass comparison bug. Made shallow copy exception on final field overwrite attempt use IllegalArgumentException instead of IllegalStateException