Major overhaul to invocation matching.