Thornhill had a famous Challenge Cup victory snatched away as Doncaster scored a dramatic last minute try.