Update codegen to do CanDeletes in a predictable order