optimize allowList matching and inline a local assignment