Well it turned out to be a simple problem, and now I have another item to add to my PIC gotcha list. Before I rearranged the I/O in order to use the comparator, I made a copy of the project so that I could return to it if the need arose. Then I modified the source code of the new project. However, I forgot to set the new project as the main project. So, whenever I made a change to the new source code, it was still assembling and downloading the code from the old project.