What I encountered in DI was that options (macrovars) were somehow quoted which caused problems when using the macrovar values in comparisons.
What helped was (in user written code) to %unquote() them.
Patrick's tip has helped me as well several times, and it will help in this situation as well, except for...just of curiosity, could it really work with x = 7? x and _x are totally different macro variables...?! Have you defined _x somewhere else in your code perhaps or is it a typo?