Shoot yourself in the foot

1. Inadvertently cause a problem for yourself.