indexstorage.js: check & repair + tests