(maint) Removed duplicated function and comments.

This removes duplicate code from hiera/backend.rb