ERT buffers seem to have a default directory that is determined by the first time the buffer is created. If you switch projects, DWIM behavior will operate as if you are working on the old project. Easy to fix. Just considering how to do it robustly.