I have version 2.7.7+ (Build: 20150313)
I have my config set to use customscripts, which I've homed in /local/customscripts/
I have enabled extra developer debugging and am showing it to the page.
If I copy /course/view.php into /local/customscripts/course/view.php then reload the course page , a large stack trace (http://pastebin.com/JKPxut3j) is output at the bottom. At first I thought this was my theme or blocks with actual unclosed tags (it's not), but then discovered that if I remove /local/customscripts/course/view.php (so it falls back on the default location), no stack trace is displayed.
Why is the behaviour inside customscripts different for the same file?