Why is there a const after the * in this cast ?  It serves no purpose !
Why are you casting away the const *before* the * ?  Either it's (as I suspect) Hideously Wrong to pass this to VarRefDestroy (because  we have no authority to destroy anything VarRefParseFromBundle returns) or VarRefParseFromBundle's return type shouldn't be const-qualified !