Fix for puppet 3.5

Also contains tests to avoid regressions in validator.