Fixed issue where '-' characters where not being replaced by '_'
characters in flag names when matching environment variables.