Your function only has about 5 lines as you have shown it here so I don't know how it could error on Line 13 unless the function is bigger than you show.
What does
which even_index
point to? And when you open what it points to is it the function you expect it to be?
Also, if you select the 'Pause on errors' option from the Run dropdown menu in the editor before calling your code in the command window it will stop on the line that has the error.