Bugfix to clientscript: improper ordering of rendered scripts