I haven't worked on trading systems in the US, but handling this type of gotcha is the bread and butter of the sort of trading software I have been working on.
There's a million tiny details like this that can cause consequences that are both different from what a customer intended and what our terms with said customer states, so making sure it's all handled in a safe way is just part of daily business.
I can’t imagine working on software that could have such potentially disastrous financial consequences, so kudos to you and all of the developers who do this kind of work.