do not erase Const flag of expected type when it is initialized to a structure declaration (closes #2467)
keep empty abstract implementation class if it is used (closes #2454)