cleaner implementation for LAZY_INIT_REF