Charj: fix accidental 'def after ref' problem