DEV: Reset class variable for register_custom_public_type spec (PR #10768)

Followup to c664ba8f.

GitHub

LGTM (pending build of course), thanks for this!

Thanks @martin-brennan, Sam responded to the original issue though (and he prefers to keep this as is): DEV: Fix flaky UploadSecurity spec

@pmusaraj yeah responded there, closing this, thanks anyway!