Jim,
I'm not sure about the half the part height thing but if it works for you, use it. The part I was probing was 6" at the highest and 0.25" at the narrowest using a rotary axis. I only had to add 0.05" to the height to not get the error. Essentially, just enough that the probe wasn't touching when it started to move over one step. If the probe contacted the part prior to arriving at the stepover location, it would simple rise until it lost contact again plus the 0.05". I did have to slightly adjust the micro adjustment screw on my probe and also slow down the stepper motor acceleration because the quick movements would falsely trigger my probe. My machine is also homemade and I'm using an $80 probe I got from ebay. As far as dynamically changing the variables, I'm pretty sure Linuxcnc only reads the gcode file when it is loaded. I'm glad the added lines helped but I just borrowed the changes from someone a lot smarter than me.