cWorld: Fixed scheduler.

Fixes #1534.
Added a test case into the Debuggers plugin.