Re your earlier comments. Detection of the possibility is trivial. A duplicated tx is necessary for the possibility and also invalidates the block. That’s not the problem however. We need to be able to know that the cause of the invalidation is malleation, since that alone precludes caching the invalidity.