Pattern matching dicts in head terms?

Related: Missing a way for partial dict unification in clause header?