78l05 to-220
The reason that your output was 8V when you reversed the input and output of the regulator was due to an internal diode included within this IC. The diode is connected with the anode on the output and the cathode on the input. Its purpose is to discharge the output capacitor at power off. If the output capacitor holds a charge longer than the input capacitor, it can reverse bias the internal pass transistor and damage it.
When you connected the regulator with the input and output reversed, this diode was then forward biased which increased the output voltage .
I mention all this, because this sort of voltage reading is a valuable troubleshooting clue. If the output is too high and the device is not shorted, then I usually suspect an improperly installed linear regulator.