fixes #6375 - fix needed for Rails 3.2.8 only that ensures reference_id on parameter.rb matches the nested object id

@ares, rather than putting if the conditional  if Rails.version is 3.2.8 or less, it may be better just to make this a downstream patch, @ohadlevy ?