Relationship between locked modes and thermal quenches in DIII-D