I cannot rebuild mothballed track inside a tunnel - dragging the tunnel over the mothballed piece does nothing, and normal tracks are not available in underground mode - the piece is at 1321,2186,3 (bridgewater-brunel game)
Normal tracks can be built underground by selecting them in above ground or sliced underground mode and then switching to underground mode. This will need fixing nonetheless.
Thank you both - Rollermaterial was correct about the nature of the issue. I have now amended the code so as to allow selecting ways other than elevated ways when in underground mode.