CRM-15450 - Fix D6 to render scripts in correct order