Packaging doesn't build code - can't find /Script/MyProject?

I’m using RunUAT from the command line to package a Win64 version of my game. I use the arguments:

BuildCookRun -nocompileeditor -nop4 -project=MyProject.uproject -cook -allmaps -stage -archive -archivedirectory=MyOutputPath -package --WindowsNoEditor -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -clean -pak -prereqs -targetplatform=Win64 -build -utf8output

I’ve noticed that if I make code changes to the project, they aren’t reflected in the packaged build. This seems like a bug - shouldn’t the packaging step build code as well?

Here’s what I did:

  1. Build a package of MyProject
  2. Run the package, seems fine.
  3. Create a new C++ TestActor in MyProject, add him to the map. All he does is DebugPrint to the screen.
  4. Build another package of the game. Notice that the packaging logs say they can’t find /Script/MyProject , so they can’t resolve TestActor.
  5. Run the package, sure enough - I don’t see the DebugPrint.
  6. Open Visual Studio and build the solution.
  7. Build another package of the game.
  8. Run the package - there’s my DebugPrint!

Steps 6 and 7 shouldn’t be necessary, right? RunUAT should compile all my game code, I shouldn’t have to manually build before running RunUAT.

Any suggestions for what might be going wrong, or is this expected behavior?