factor out not_scheduled flag testing

You have to think about the is_Proj() special case, so factoring this
out is warranted.
cleanup, use C99
beflags: simplify+fix can_move by replacing it with a recursive algo