It looks like the "INSERT OR REPLACE" doesn't work when row elements are non-unicode. It seems to be the "OR REPLACE" clause that is flawed. The outcome was that values didn't really get updated and a transaction was left uncommitted. This commit fixes the unicode part of the problem though.