Maybe you're in a quest for a SED bug rather then a bug in your initial script itself. SED crashes in A7 crashes too with the use of a syntax correct algorithm from time to time at my end here. Thus I suggest you keep on doing the same test for one single day and write down when it crashes. The day after tomorrow, you simply report this at the bug hunt section to see if they confirm the error

Thanks in progress
Frazzle