Determine local variables from compiled scripts instead of the values in the script record
Since we are compiling on the fly instead in the CS we can not rely on the fields in the script record.
(RM-1615 from redmine: created on 2014-07-02 by Marc Zinnschlag, , closed on 2014-07-25 by Marc Zinnschlag)