  Exploiting the powerful tool of strong gravitational lensing by galaxy
clusters to study the highest-redshift Universe and cluster mass distributions
relies on precise lens mass modelling. In this work, we present the first
attempt at modelling line-of-sight mass distribution in addition to that of the
cluster, extending previous modelling techniques that assume mass distributions
to be on a single lens plane. We focus on the Hubble Frontier Field cluster
MACS J0416.1-2403, and our multi-plane model reproduces the observed image
positions with a rms offset of ~0.53". Starting from this best-fitting model,
we simulate a mock cluster that resembles MACS J0416.1-2403 in order to explore
the effects of line-of-sight structures on cluster mass modelling. By
systematically analysing the mock cluster under different model assumptions, we
find that neglecting the lensing environment has a significant impact on the
reconstruction of image positions (rms ~0.3"); accounting for line-of-sight
galaxies as if they were at the cluster redshift can partially reduce this
offset. Moreover, foreground galaxies are more important to include into the
model than the background ones. While the magnification factors of the lensed
multiple images are recovered within ~10% for ~95% of them, those ~5% that lie
near critical curves can be significantly affected by the exclusion of the
lensing environment in the models (up to a factor of ~200). In addition,
line-of-sight galaxies cannot explain the apparent discrepancy in the
properties of massive subhalos between MACS J0416.1-2403 and N-body simulated
clusters. Since our model of MACS J0416.1-2403 with line-of-sight galaxies only
reduced modestly the rms offset in the image positions, we conclude that
additional complexities, such as more flexible halo shapes, would be needed in
future models of MACS J0416.1-2403.
