Fixed #17673 -- forbidden field shadowing

I've rewritten the previous patch from scratch because of the new system check framework.