add_types: only re-enable double-write check if it was previously enabled

8 jobs for doublewrite in 25 minutes and 53 seconds (queued for 2 minutes and 40 seconds)
Name Stage Failure
failed
pycodegen-integration Test
make[2]: *** [tests/field/CMakeFiles/CodegenJacobiCPUGeneratedJacobiKernel.dir/all] Error 2
CMakeFiles/Makefile2:5596: recipe for target 'tests/field/CMakeFiles/CodegenJacobiCPUGeneratedJacobiKernel.dir/all' failed
CMakeFiles/Makefile2:5749: recipe for target 'tests/field/CMakeFiles/CodegenJacobiCPU.dir/rule' failed
make[1]: *** [tests/field/CMakeFiles/CodegenJacobiCPU.dir/rule] Error 2
make: *** [CodegenJacobiCPU] Error 2
Makefile:1982: recipe for target 'CodegenJacobiCPU' failed
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1