HOIST WITH A PETARD (or PETAR), phr. (old).Caught in ones own trap; involved in danger meant for others.
1596. SHAKESPEARE, Hamlet, iii. 4. 207.