I have a theory that since Yoshi's Island took place first chronologically- and therefore prior to SMB2USA- Mario could have subconsciously remembered the Shy Guys, and only seen them in his nightmares until they started appearing in his normal life again. But then again, that's just a theory, and holds absolutely no water in the overall scheme of things. :]
(But anyway... would that sort of thing be possible?)