Fix for SIMEX matrix construction with new SQLite usage