Duplicates of same image on embedding

When same image is attached to e-mail on multiple places, each occurence of that image will attach new image to email. Expected behaviour is, that same image will always use same ID on each place and only first occurence will attach and create custom unique ID for email.

Example:

{% set HeaderLogo = 'emails/logo.png'|media %}
<header>
{{ message.embed(HeaderLogo) }}
</header>
.... body content ...
<footer>
{{ message.embed(HeaderLogo) }}
</footer>

This code will attach 2 same images instead of “reusing” same identificator.