This was caused by an error I made when converting old code during the constraints recode 2. As a result, constraint subtargets got cleared, messing up proxies. (set_constraint_target didn't use to clear the subtarget of a constraint when passed NULL for the subtarget argument)