Fix connecting of attachment model signals
Those signals have to be connected after a message has been set for the
parser. Otherwise, the parser returns nullptr as attachment model.
We check if we set a different message for the parser to avoid double
connections.