Adds sectionref repair method and upgrade script [#1115 state:resolved]