Have you ever read the questions on the 4473 form when you buy a firearm?
Have you ever been adjudicated as a mental defective OR have you ever been committed to a mental institution?
There it is. The proviso is already there. Just insert that into the instant check database and presto, at least for the ones on file...