Ref gh-1117: Don't stop on a falsy value in buildFragment.
(cherry picked from commit 8e6c1ba92faf830d40cafe7a4deb4ad5ab9045fe)
Adding some more test coverage for .finish()
Follow-up for 0ed497b