I am having a problem that appears to be related to code size. The chip is 16F917, PBP version is 2.46

The total code size is over 4000 words Everything compiles and one version of the code works just fine. However a small change is one subroutine to make it more user friendly seems to break eveything. It appears to fail to initialize properly ( based on fact that the opening splash screen never displays and the instrument will not respond to any of the inputs it should immediately after power up). The code is for a company project and so I can not post it all, but I have posted the two code snippets, the total word count of the program when using each variation and the address range

I encountered this problem once or twice before during this project and both times a change in code size has corrected it. Once was nothing more than adding a line like X = X. This leads me to think it may be some type of boundry issue, but I have to admit I am new enough to PICs and PBP that I am more than a little confused at this time.

Any help or suggestions would be appreciated.

The one that works:
4145 words
0-1037 address range

IF (OhmCheck = FAILED) or _ ' resistor out of tolerance or
(FlagResult <> 0) then ' hardware flag
GOSUB Houston
ENDIF
-------------------------------------------------

Replace it with this one and it does not work:
4281 words
0-10bf address range

IF OhmCheck = FAILED THEN
ErrCnt = ErrCnt + 1
IF ErrCnt = 1 then 'first time gets a pass for a recheck
Device = DISPLAY
GOSUB SetCtrl
LCDOUT $FE,1,"Chk Dckbill conn"
LCDOUT $FE,$C0,"then retry test"
PAUSE 1000
ENDIF
ENDIF
IF (ErrCnt > 1) or (FlagResult <> 0) THEN
GOSUB Houston
ENDIF