As of 1.12, defining a template class that extends RestCallback leads to heap corruption during game startup (compilation).
This can be demonstrated by adding the following code to a mod:
class ExampleCrash<Class T> extends RestCallback { }
In the previous version, 1.11, this worked perfectly fine.