ref-filter: introduce ref_formatting_state and ref_formatting_stack