Integer optimisation with user's multivariate functions: Possible in Julia?

I get “LoadError: KeyError: key :g not found”. Here, :g is the user-defined constraint registered with JuMP and added through JuMP.addNLconstraint. This constraint is indexed and added in a loop, as in JuMP; Rewriting an @eval @NLexpression with a user defined function in local scope w/ Expr