The workaround when enabling FLAG_NUMBERS in setShowNumbersInView here to catch the force close just resets the selection to 0. There should be either a better way to do it or a real fix for the bug (it selects the footer for no reason). Anyway I'm fine with how it works and don't have the motivation to struggle with it any longer.