Fix issue with gre protocol registration when running multithreaded