Hi Indulis,
The heatsink tab is connected to the output terminal of an LM317. To avoid having output current in the wire connected to the voltage-setting resistor, my LM317 project uses the tab as the output terminal and the output pin for the voltage-setting resistor. Then the voltage regulation with changing load current is so good that I measure hardly any change in voltage at the output. ;D