XF 1.5 Internal Server Error When Editing thread_view Template

I'm getting an Internal Server Error message when trying to edit the thread_view template. I'm trying to get the sidebar added to threads, following instructions from here. Any idea why I'm getting the error? I don't get it when editing other templates?

Screenshot 2017-06-22 14.10.04.png