Fix off-by-one assertion and shore up db_schema checks.
Fix off-by-one assertion and shore up db_schema checks.

I'm not making a very good case against the need for memory safety, am I?

rmoorman/stronglink,Lacra17/stronglink,feld/stronglink,nkatsaros/stronglink,feld/stronglink,guiquanz/stronglink,nkatsaros/stronglink,iOSCowboy/stronglink,iOSCowboy/stronglink,rmoorman/stronglink,btrask/stronglink,shaunstanislaus/stronglink,iOSCowboy/stronglink,feld/stronglink,Lacra17/stronglink,shaunstanislaus/stronglink,guiquanz/stronglink,Ryezhang/stronglink,rmoorman/stronglink,shaunstanislaus/stronglink,Ryezhang/stronglink,yamingd/stronglink,btrask/stronglink,btrask/stronglink,yamingd/stronglink,btrask/stronglink,Lacra17/stronglink,Ryezhang/stronglink,yamingd/stronglink,guiquanz/stronglink,nkatsaros/stronglink