Lieutenant Maurice Dease was the first recipient of the Victoria Cross in WWI, having died in command of a machine-gun crew of the 4th Royal Fusiliers on the very first day of combat.
As the Royal Fusiliers is an infantry battalion, would he officially be an "Infantry Officer", or would his official role be "Machine-gun Officer" in the infantry?
He would be Lieutenant Dease of the Royal Fusliers, but might be referred to as the Machine-Gun Officer. His rank was Lieutenant, his job was machine-gun officer.