factorize start and last initialization in front of the if statement

1 job for calib-smoother in 4 minutes and 20 seconds (queued for 2 seconds)
Status Name Job ID Coverage
failed unit_tests #27834


Name Stage Failure
unit_tests Test
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:72 [inlined]
[7] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:89
[8] test()
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:81
[9] top-level scope
@ none:1
Cleaning up file based variables
ERROR: Job failed: exit status 1