Okay, I think that one was on me, and I did tell you to set up a circular dependency.
Rather than having the custom_command be dependent on NanoMacTracker_APPL, does it work any better if it's dependent on build/NanoMacTracker.dsk ? I think that should create the right chain of dependencies...