fix #28491: crash on move after adding hairpin

See issue report for gory details on what is hopefully a simple fix.