Further reduce allocations in rule transitions functions
Avoid unnecessary dynamic cast in symbol equality function