Can't you do the trap for serial console only? I guess we know how to detect it, right?