Follow-up to #10312: Fixed minor performance related issues in Yaml\Inline.