Quantum-mechanical tunnelling and the unitarity of the scattering matrix