The influence of forward-scattered light in transmission measurements of (exo)planetary atmospheres