[possible bug] Max6 Project-local path and JavaScript

I think it’s a bug.
I have a project (Max6 Project) with some graphics files (placed in proper ‘media’ subdirectory). I want to use these files in jsui. JavaScript sees them only after I refresh the project, or (re)open patcher (containing jsui) anew. When I’m editing my js file and save it (so it’s recompiled – autowatch), now jsui can’t find those files. I suppose there is a problem with search path, which is somehow reset when saving js file (in max text editor).