CRM-15416 - Fix potential "access denied" error with dynamic js files