Depending on what other settings are in props.conf, it's possible the # lines are ignored.
Even so, however, each line of the CSV file is processed independently with the transform attempting to find "#". When it fails to find a match (because there is no "#" on the line) the host name is not written
I'm not aware of a method to extract a field and then use it in every event that follows. Perhaps you coudl suggest it at https://ideas.splunk.com
--- If this reply helps you, Karma would be appreciated.