Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie.