tirar piedras contra el propio tejado

Etymology
lit. 'throw stones against one's own roof'.

Verb

 * 1)  to foul your own nest, to shoot oneself in the foot
 * 2)  to cut off one's nose to spite one's face