Have you reduced the program to the simplest case, something like blink?
Have you tried comparing a small, simple, sketch built in a way which works with the same sketch built in a way that does not?
There are a few causes I can think of.
This probably is not the issue, but it is worth being clear. Are you loading to RAM intitially? IIRC, there was a period when there was a bug in the bootloader that might look like that problem.. If a program is loaded in RAM, the bootloader needs to know. however, part of the point of loading into RAM is to *not* load from there after a power cycle. So, IIRC, the bootloader sets a 'magic value' in RAM so that it would come back through reset and start at the program in RAM. However, it did not reset the magic value after a load into Flash. So it would keep trying to run from RAM until a power cycle destroyed the magic value. I thought it had been fixed, but maybe you have an old bootloader?
If you have a program that works when built by the Maple IDE, but not when built otherwise, try to compare the files.
A first step would be just check their sizes.
Within the Maple IDE package, there is gcc's nm and objdump. The nm program will give the list of symbols (functions and global variables) in a executable (before the IDE strips it down to a hex, IIRC). So a step would be to get the symbols in each file and then sort and compare the two lists, e.g. with sort | uniq, or sort the files then diff. If there are different symbols, then it may be clear what is happening.
If this shows very few differences, and it isn;t clear, then try objdump on each program to get an assembler listing, and diff those. If you are lucky, the order of the object files will be similar enough that the differences are clearer.
(Full disclosure. I am not a member of LeafLabs staff)