Here is the law:
For the purposes of the National Firearms Act the term Silencer is defined in 18 U.S.C. § 921(a)(24)
The term “Firearm Silencer” or “Firearm Muffler” means any device for silencing, muffling, or diminishing the report of a portable firearm, including any combination of parts, designed or redesigned, and intended for the use in assembling or fabricating a firearm silencer or firearm muffler, any part intended only for use in such assembly or fabrication.
It doesn't say anything about 'attached to the muzzle, or the barrel.
It says it is
any device for silencing, muffling, or diminishing the report of a portable firearm.
I guess that would include reducing the gas port blast too, if it reduced the sound level measurably.
The thing you have to understand though, is this.
By the time the residual gas-piston pressure is bled off, the bullet and muzzle blast is long gone down range.
By then, bore pressure is near atmospheric, and if it wasn't, the empty case would still be stuck tightly in the chamber from the high pressure, and could not be extracted.
The puff of smoke or powder gas emitting from the gas piston bleed-off is in no way high enough pressure to create a super-sonic shock wave or loud blast that contributes much if anything to what had already happened when the bullet left the muzzle.
rc