If you install a metal bar from the shoulder stock to the bottom of the pistol grip, thereby turning it into a thumbhole stock, you can then add a flash hider without violating the law (but consult an attorney first, as I'm no expert).

In any event, if the attachment you install does not ACTUALLY HIDE FLASH, then it is not a "flash hider" as defined by the statute/BATF. So a muzzle brake only (which typically exacerbate flash) is OK to install. Again the caveat is check with a lawyer to be sure.