Avoid using getParameter in setConstant

We already know about the current program that is in use. So we can skip calling getParameter here, doing it for every constant is not a good idea. In general we should not call getParameter as it slow.