Fix generic definitions handling