core/walker: pre-creating the callbacks map to make traversing faster