I will hopefully have time to look into this next week. This week, I am on DocumentJS.
But, I'm guessing something like your fix sounds about right. I will look into it as soon as I can. If you don't hear from me by Monday, please post here again and I will make sure you get the right fix. Thanks!