Internal layer intersecting the boundary of a domain in a singular advection–diffusion equation