Fix printing regression from #3848.
Merge pull request #3972 from brendandahl/print-reg

Fix printing regression from #3848.