did some re-factoring in Store::CheckDataConsistency(),
added assert in Store::GetStatement()