Properly handle agents with 'parse-names' set to 'true'.

Closes #77.
Added tests for #77.