Re #8554. Fixed bug found in testing.
Merge branch 'feature/8554_scd_reduce_scripts' into develop