Part of statement missing from sys.dm_exec_query_stats
It's difficult to say what might be going wrong with your script, since you didn't show us what you're running. But no matter -- you're probably better off using sp_WhoIsActive, and doing something like this:
EXEC sp_WhoIsActive
    @get_plans = 1,
    @get_full_inner_text = 1,
    @get_outer_command = 1;