The answer here was to click Build->Load All (Ctrl-Shift-L) (or equivalently run devtools:load_all("path/to/my/project"), which loads the correct things into scope.
devtools:load_all("path/to/my/project")