Mark util functions as static.
Use size_t for traits cache index.