Semicorrect handling of peeled refs