She was bareheaded, as if she were staying in the house—a fact which conveyed perplexity to the son of its master, conscious of that immunity from visitors which had for some time been rendered necessary by the latter's ill-health.
Who does latter refer to? Also, who needs immunity here? master or visitors?