filter out gadgets with illegal instructions