Account for gdefault
Merge branch 'petobens-master'

Fixes #4 “gdefault and replace_all” until substitutions are rewritten.