Closing, I have not had any resets anymore with the respective code changes. Much thanks to Alex for finding this issue!