Puppet apache module causing 'Error 400 on SERVER: Invalid parameter identifier'

I am receiving the following error when trying to use the latest puppetlabs-apache module from github (https://github.com/puppetlabs/puppetlabs-apache):

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter identifier at /etc/puppet/environments/development/modules/apache/manifests/mod.pp:40 on node cacti.mydomain.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping runn

My node config looks like:

node 'cacti.eye.fi' inherits 'base' {
  include apache
  include mysql::server
  include yumrepos::epel

  package { 'cacti':
    ensure => 'latest',
  }
}

mod.pp contents:

define apache::mod (
  $package = undef
) {
  $mod = $name
  include apache::params
  #include apache #This creates duplicate resources in rspec-puppet
  $mod_packages = $apache::params::mod_packages
  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
  if $package {
    $package_REAL = $package
  } elsif "$mod_package" {
    $package_REAL = $mod_package
  }
  $mod_libs = $apache::params::mod_libs
  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
  if "${mod_lib}" {
    $lib = $mod_lib
  }

  $mod_identifiers = $apache::params::mod_identifiers
  $mod_identifier = $mod_identifiers[$mod]
  if "${mod_identifier}" {
    $identifier = $mod_identifier
  }

  if $package_REAL {
    package { $package_REAL:
      ensure   => present,
      require  => Package['httpd'],
      before   => A2mod[$mod],
    }
  }

  a2mod { $mod:
    ensure     => present,
    lib        => $lib,
    identifier => $identifier,
    require    => Package['httpd'],
    notify     => Service['httpd'],
  }
}

I have verified that the /var/lib/puppet/lib/puppet/type/a2mod.rb type has the identifier parameter and it is the same MD5 as the server:

Puppet::Type.newtype(:a2mod) do
    @doc = "Manage Apache 2 modules"

ensurable

newparam :name do
   desc "The name of the module to be managed"

   isnamevar

end

newparam :lib do
  desc "The name of the .so library to be loaded"

  defaultto { "mod_#{@resource[:name]}.so" }
end

newparam :identifier do
  desc "Module identifier string used by LoadModule. Default: module-name_module"

  # http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier

  defaultto { "#{@resource[:name]}_module" }
end

autorequire(:package) { catalog.resource(:package, 'httpd')}

end

I am using Puppet 3.0.2 on both agent and master. Any idea what may cause this?

I think I finally tracked down a couple Puppet bugs which appear to be the cause of this. It is related to my use of multiple environments for testing and updating (which I didn't mention in the original problem since I didn't think it was relevant).

The first bug which showed up in a Google search after removing 'identifier' from my search term:

http://projects.puppetlabs.com/issues/17814

Then, this bug links to another which sounds like it is directly related:

http://projects.puppetlabs.com/issues/12173

I am also following http://projects.puppetlabs.com/issues/17210 and it could be related. I am following these bugs. I can confirm that after I actually merged my code to the main environment, it did start working (since the Puppet master now saw the code changes).