Avoid declaring facts inside of other facts. It's better to do everything in the top scope if you must, see https://github.com/camptocamp/puppet-lvm/blob/master/lib/facter/lvm_support.rb