Rust doesn't like inlining the iterator returned from AsBytes::as_bytes, likely because it's too deeply nested with a large number of Chains. This affects length_in_bytes equivalently. We should look into how to improve the situation, for example by accepting a closure instead of returning an iterator.