We get a BadImageFormatException if the custom attribute constructor refers to the T's of the owning type. I have a fix in #57466 but I won't have time to write tests anytime soon. It's better if that's handled by the owners of S.R.M.