no need of alloca here, an array is enough
dispatcher: longest match tests, regression tests

and a fix for a bug found along the way.