Follow-up to #31524 with a more general fix Release Notes: - N/A --------- Co-authored-by: Piotr <piotr@zed.dev>