Also add a regression test. Closes: preprocessor#40 (manually cherry picked from commits 66a51135 and 080740b5)