BZ-1034910 Loading data model fails with NPE if the project contains a class with public field with no getter nor setter

OBS: previous commit related to this BZ af57f1b8ea1ea470f5f6660a033ae5c15e6fc9a0 should not be cherry-picked to 6.0.x branch.