--- OC-5819   Performance issue due to unnecessary repeated generation of JavaScript ---
Fix of the repeated generation of JS-code. See JIRA on OC-5819 for details.