optimize-script-compilation - compile script upon value retrieval