Engine Error after deconstruction of building over water

A while back I designed a basic stone bridge as a test of the building code as it relates water and building up in the air. I designed it in segments so that it could potentially be reused to fit a variety of terrain scenarios.

While re-testing this bug I built the stairs segment, which starts on land and leads up over the water. I then deconstructed it.

The moment the deconstruction was complete, the engine error (below) appeared.

Steps to reproduce:

  1. Grab the building templates from this bug and add them to the game.
  2. Build the stairs segment such that it extends partially up over water.
  3. Once complete, deconstruct the building. (bonus non-fatal build logic bug here)
  4. Once the building has been deconstructed, you should encounter the engine error (below).

Expected Results:
Uneventful building deconstruction

Actual Results:
Engine Error

Engine Error:
release-549 (x64)
std::logic_error: ‘invalid reference in native get_id’
stack traceback:
[C]: ?
[C]: in function ‘get_id’
radiant/modules/entities.lua:301: in function ‘get_world_grid_location’
…rth/services/server/build/scaffolding_builder_2d.lua:186: in function ‘_create_builders’
…rth/services/server/build/scaffolding_builder_2d.lua:171: in function ‘_on_project_changed’
…rth/services/server/build/scaffolding_builder_2d.lua:129: in function <…rth/services/server/build/scaffolding_builder_2d.lua:128>

stonehearth.log (291.8 KB)

Version Number and Mods in use:
release-549 (x64)