Step 1: Frame the question around procedural safety: D&C breaches the cervical barrier and manipulates the endometrium, so the contraindication will be a state where this manipulation causes harm.
Step 2: In acute or active pelvic inflammatory disease the genital tract is already infected. Introducing curettes risks driving organisms from the lower into the upper tract, worsening salpingitis and risking pelvic peritonitis. Thus PID stands out as the contraindication.
Step 3: Supporting this, upper-genital-tract instrumentation (D&C, IUD insertion, therapeutic abortion) is itself a predisposing factor for PID - reinforcing why operating during active infection is avoided.
Step 4: Reviewing the rest: endometriosis poses no infection-spread risk for curettage, and ectopic pregnancy is not a curettage contraindication (curettage is sometimes part of its work-up). So the single best answer is PID.
\[\boxed{\text{Pelvic inflammatory disease (PID)}}\]