This was bothering me so I thought I'd attempt a patch.  This is my first time working with the SQLite code so please tell me if anything seems wrong.  I'm submitting this as anonymous because I can't figure out how to create an account here.

The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law.