Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.