How do you use drupal's devel krumo ddebug_backtrace()?
This bug was quite annoying to solve. What I did was:


Isolate the variable that was causing the issue.
Setup a conditional to detect this variable when it happens.
Add drupal's ddebug_backtrace() to the conditional.
Trace back to where the function was being called up.
Find out how that problematic variable is being passed in.
Keep following the backtrace to the point where that variable is assigned and not just passed along to another function. In my case it was in theme() that assigned the blank variable $template_file. 
From there I needed to know when theme() was being called. The original backtrace didn't leave any clues to which module was calling it aside from views, but views gets called all over the place. Now I needed to find the module that was calling views.
In theme() there were a bunch of hook variables that gave the hint of where it was coming from. I dpm() all the $hook and $hooks variables and it showed the error was happening when a "display suite" hook was being called. 
In the end all I needed to do was uncheck this box. I still don't know why it caused the issue randomly... -_-




My debug code to get the output I needed: