It is entirely possible that he was outed by the simple fact that the terror alert was elevated.
Possible that they could have scrambled once the building-specific alert got issued, but if the terrorists had any doubt, the U.S. removed it:
Last Sunday, U.S. officials told reporters that someone held secretly by Pakistan was the source of the bulk of the information justifying the alert. The New York Times obtained Khan's name independently, and U.S. officials confirmed it when it appeared in the paper the next morning.
U.S. officials first revealed that Pakistan had nabbed a guy and that this action gave them the info to issue their terror alert on specific buildings. Then the NY times figured out the likely name and the U.S. confirmed it.