Added a case to the unit test to catch duplicates on the same line.
Corrected couple of the regexes to properly handle the initial line of
the variable assignment.