Rework translation of static methods to fix several bugs.