compat: avoid duplicate __ref definition