Fixed order of context setup and script compilation