The position you came to fill is a relatively rare skill here in the US and it helps the US to bring in talent from abroad, but the person you replied to isn't wrong. It's not like compiler engineers don't exist in the US. They most certainly do and they most certainly would make more money if you couldn't get compiler people from abroad.
Personally, I would love it if we were far more liberal with giving out H1-B visas, but also required companies to pay those H1-B visa holders a premium over local talent. i.e. if the market rate is foo, then you need to pay 1.5x foo salary to bring that person from abroad. This would ensure that companies actually can get access to all the talent they need irrespective of origin, but that the talent that comes from abroad doesn't depress salaries.
1.5x foo is friggin' cheap if the alternatively is not having the talent at all. It also forces you to always consider domestic labor first if it exists instead of abusing the H1-B visa program to get cheap labor like many companies do.
Such a system would also serve to help salaries rise to the levels enjoyed by doctors and lawyers (which is really where salaries should be for any solid engineer). If this means certain business models are no longer viable, then c'est la vie. There's nothing that says that you have a right to a business model that wouldn't exist if salaries were not depressed.
Alternatively, I would be okay with eliminating the lottery and giving visas out on the basis of the premium companies are willing to pay over the salary a domestic worker would be paid. If your company is willing to pay 2.0x foo for a position, then you will get the H1-B visa ahead of a company only willing to pay 1.5x foo. The floor would be set at something like 1.1x foo.