Please see the issue here:

This is the correct end for this fun, and it works when the cursor is on it:

However, what is worst, when we highlight the end, the wrong fun is highlighted:

This is not a huge issue, but may be pretty confusing with nested funs, or different indentation.
I don't know anything about plugin development, so I'm not sure where the issue comes from.