Given the following example, Emacs fails to find the matching end keyword because the variable name contains a keyword.
function valid_for_read(handle)
...
end
Tested with for, if, and function. For this silly example the end keyword matching the actual function definition is the last one.
function if_for_function()
end
end
end
end