This is unrelated to this bug so it probably belongs in a separate PR.