Although it took a while to figure out, its definitely due to the fact that the iterator to the cancelled command in the m_scheduler_command is invalidated, even though it is still used by the Scheduler::run command. This causes a seg fault!
We should either document this and inform the user, or we should somehow allow them to cancel commands within the execute loop.