REVIEW-1982/REVIEW-2099: Add more coverage for applying scripts from settings and from init file