Refactoring of CompileTimeConstant, introduce flag to represent a constant being referenced by a variable