TM: simplify match test for current tag
TM: don't needlessly duplicate array when searching for current tag
fortran: Make sure not to index kinds out of bounds

This also makes recent GCC shut up about indexing below the bounds as
it detected the code checked for a negative index yet didn't guard the
actual access.  For now GCC doesn't understand the more comprehensive
check, but it might come back if GCC becomes smart enough.

Anyway, this makes the Assert() more correct, and addition of the
explicit kinds array size makes sure any future kind addition won't
miss its entry.
Merge branch 'tm/faster-current-tag'

This makes tm_get_current_tag() roughly 4.5 times faster.