Never had an issue like this with Proteus and I use it quite a bit in work, you will have to post your code along with the version of Proteus installed.
When you say it "stopped working" did you mean it didn't process the new code or it didn't even run the code that was previously working before extending the main function?
It is good practise to seperate blocks of code into functions anyway.
I presume you are using C to compile? HiTech or another? Also post version used for compilation and MPLAB version, and versions of any other 3rd party compilation tools if necessary.
Regards
Wilksey