Quantum-correlated measurements of D → KS0π+π−π0 decays and consequences for the determination of the CKM angle γ