Suppose two transactions are prohibited: one concerns something that cannot serve as a legally recognized subject of sale, while the other has the ordinary contractual elements but contains an impermissible additional condition. Both may be prohibited, yet their legal effects need not be identical.
Transferring the cause of nullity from the first transaction to the second requires showing that the same legally operative defect is present in each. Simply observing that both are forbidden is not enough to establish the same consequence by analogy.
Diagnostic question: “Prohibited” is shared by both, but does that common description itself prove the absence of every contractual effect? That requires separate justification.