Better performance for #3064, but #5030 is now expect-broken