He has benefited from each loophole that lawmakers offered to real-estate companies.