deprecate StubIndex.get, replace its usages with safeGet made static and renamed to getElements