num_dereferences is no longer a hard-coded constant