(Spoilers for anyone who hasn't played this mission yet)
I've tried to run "What Lies Beneath" four times, at least once with a Fed and a Klingon character. I always get to the end, scan the portal, receive the message that the mission is complete and I should beam out. So I beam out. Then, instead of returning to my ship, I'm back on the station, and the mission log says that --OOPS! You Forgot To Scan The Portal!-- And I can't get back to the mission levels; I have to start all over from the beginning.