Fix crash in struct hoisting when a method has no definition
Allow disabling struct hoisting