tex2D returns a float4, so that means the fourth component is also taken into account
In your second code, you cast the four-component color into a float3 first, so that the result of normalisation will be different as the fourth component is no longer taken into respect.
The fixed version of your first code is:
float3 normal = normalize( 2*tex2D(tex_0, l_texcoord0).rgb - 1);
There are more ways to do it, e.g. using the f3tex2D fixes it too.