core: sched.c did not compile with DEBUG=1
Merge pull request #1962 from Kijewski/sched-fix-debug-1

core: sched.c did not compile with DEBUG=1