The error is occurring because there is an extra space immediately after 'setblock'. Meaning: (underscores are spaces) "setblock _ _ ~ _ ~1..." It's trying to parse the second space as the x coordinate. Can't determine if this should be a bug, just clarifying the issue.
I can reproduce it right here! Why was it marked cannot reproduce?