Arduino - accessing extra analog pins on 32-pin SMT package
The platform as selected by the boards.txt file directs pins_arduino.h that correspond the unique pinouts of each platform. Where the UNO's 328 is defined to use \arduino\variants\standard\pins_arduino.h. aka the standard. Which has the pins A6 and A7 defined but the NUM_ANALOG_INPUTS to 6 not eight. Note the IDE 1.0.5 boards.txt for the Nano, Fio and Mini's all use a variant of eightanaloginputs which simply includes the ../standard/pins_arduino.h and replaces the NUM_ANALOG_INPUTS to 8. Allowing the extra AD6 and 7 to be accessed.

Note the compiler will work regardless, likely using the value of 0. But will have problems running.

Noting that the value falls to 0, or pin offset zero, this will likely map to PD0 or RXD, as attempting to be configured as an input. Where I suspect (not sure) that OptiBoot may have a smaller window for the Flashing, which may be missed by the IDE and the standard platform.

Where looking at OptiBoot's boards.txt I see "minio.name=[Optiboot] Arduino Mini" using the "minio.build.variant=arduino:eightanaloginputs"