That is obviously a bit silly (and bad for performance). course/lib.php should only be included where necessary.
Therefore I removed it in http://git.moodle.org/gw?p=moodle.git;a=commit;h=5d3e9d9fe33a91287ab5aa7031fa3f4ff47caee9
However, as a result, there are places in the code that need course/lib.php, but do not require_once it themselves. As we find them they need to be fixed.