One gets the distinct impression that the writers were in a hurry to wrap the second season and get out of the office, coming up with this absurdly flimsy storyline that incorporates so many flashbacks, they couldn't have had more than a couple days' material to add. The producers must have been delighted to shoot on the cheap - besides the canned material and sickbay set, the only other scenery is a fake-looking swamp with silly swinging attack vines. And the director couldn't be bothered to cut the flashbacks so that they look like memories rather than badly patched-in bits of previous episodes. Riker couldn't have remembered Tasha Yar and Picard discussing Armus on the bridge of the Enterprise because he wasn't there, having been a prisoner of Armus at the time!
Yes, this is a horrible episode, but wasn't one of the main reasons it's so half-assed was because of the writers strike that was going on back then?
Also, isn't this episode related to Future Imperfect, in that Rikers illness from Shades of Gray was given for the reason of his memory loss by the pretend Beverly? I don't recall if it was this or just some random virus