Check for last-in-sequence variable

For the last variable, try and just pop the suffix off the end instead
of searching for it as a substring.