fix the self inclusion problem when partial class has reference field that points to it