MT#8633 Properly set is_primary on sub creation

(cherry picked from commit 4f76fdaf96e0906aab9ae0c24b22fcb8ec210527)