Since the fields in INVDETyear are exactly the same as in INVDET the tables are concatenated. Meaning no new table INVDETyear is actually created. By dropping INVDET you remove the only table you had. You can prevent this by specifying the noconcatenate keyword. That forces Qlikview to create a separate table INVDETyear.
where Year > 2011;
drop Table INVDET;