apps: Correct and extend diagnostics of parse_name()