Prince Harry has faced months of uncertainty over his US visa after a think tank sought to challenge its validity.