Do you need to duplicate the "if defined? emit_trusted and emit_trusted", or could you just have both PANI and PVNI in one if block?