To answer my own question, the whitespace was being consumed because of the adjacent <noinclude> and <includeonly> style tags. It appears that there are two ways you could solve this:
1) use   to get a space that isn't encoded as ' ' 2) use <nowiki/> after the space so that the other tags see the adjacent nowiki tag and not whitespace that they gobble up.
I used #1 and my template expands as expected now.