I started trying to fix this, but it turns out that it's doing some strange things (mixes of field access and property access, for instance), so I'm going to leave it as is, for now