(I don't understand how these kinds of bugs still exist in ecommerce when it's been used for years.)
I'll file a bug report and patch.