BUG: GH2808 Apply with invalid returned indices raise correct Exception