Fred rebuild causes elements to disappear

Whenever I use the Rebuild button in Fred an element disappears from all pages where it is used. To get it back I have to go through all pages and resave them after every rebuild.

Not sure if it’s to do with the contents of the element?

    <header class="wibMasthead {{align}} d-flex" data-fred-render="{{published}}" style="background-image: url([[pthumb? &input=`{{ image }}` &options=`aoe=1&w=2000&h=1000&dpi=72&f=jpg&zc={{zoomCrop}}`]]);margin-top:{{ marginTop }}px;margin-bottom:{{ marginBottom }}px;padding-top:{{ paddingTop }}px;padding-bottom:{{ paddingBottom }}px;color:{{ textColour }};background-color:{{ bgColour }};">
      <div class="overlay {{bgGradient}}"></div>
      <div class="container my-auto">
        <div class="row">
          <div class="col-lg-12">
            <{{ level }} class="{{ align }}" data-fred-name="rubrik">Rubrik</{{ level }}>
          </div>
          <div class="col-lg-12">
            <p class="lead" contenteditable="true" data-fred-name="subhead" data-fred-rte="true" data-fred-rte-config="TinyMCE-WiB">Ingress</p>
          </div>
        </div>
      </div>
    </header>

Options:

{
  "remote": true,
  "settings": [
    {
      "fred-import": "marginPadding"
    },
    {
      "group": "Text",
      "settings": [
        {
          "type": "select",
          "name": "level",
          "label": "Rubriknivå",
          "value": "h1",
          "options": {
            "h1": "Rubrik 1",
            "h2": "Rubrik 2",
            "h3": "Rubrik 3",
            "h4": "Rubrik 4"
          }
        },
        {
          "fred-import": "align"
        },
        {
          "fred-import": "textColour"
        }
      ]
    },
    {
      "group": "Bakgrund",
      "settings": [
        {
          "fred-import": "bgImage"
        },
        {
          "fred-import": "bgColour"
        },
        {
          "fred-import": "bgGradient"
        },
        {
          "fred-import": "zoomCrop"
        }
      ]
    }
  ]
}

Does it work correctly if you remove the data-fred-render="{{published}}" from the element markup?

It does actually, yes! I realize now I’d forgotten to include published in the options. I’m not sure I understand why it works at first but disappears when I do a rebuild, but it seems the problem is solved which I’m very grateful for. Thank you so much!