Much simpler logic for back references