protect against corrupted indexes

When sext is asked to decode something that it doesn't understand, it throws an exception, which we currently don't catch.  This can nuke a get or a put or a fold.  This patch tries to keep things working when possible.