INFILE: lazy register initialization

The register / deregister functions are used very rarely. The lazy
register initialization saves saves a few bytes memory until the
register is really used.