Fix phantom referential detection