public void clearFromIndex(int index) {
        if (getTop() < index) {
            setTop(index);
        }
        stackClear(index, getTop() - 1);
    }
This ensures that top is at least as high as index, and that everything from index and up is empty.
@param index
main/src/main/java/cgeo/geocaching/wherigo/kahlua/vm/LuaCallFrame.java