Rails 2.3.5 error_messages_for with object array

Though I understand there was a problem with nested attributes and
error_messages_for in Rails 2.3.4, this works fine for me, even if one
of the objects is missing:

error_messages_for(:object=>[@order, @order.items, @order.payments])

In Rails 2.3.5, this throws an exception if any of the objects are
missing, which is the typical case in my app.

ActionView::TemplateError (undefined method `errors’ for
#Class:0xb6fbbda8) on line #4 of app/views/order/test.html.erb:
1:
2: <%= error_messages_for(:object=>[@order, @order.items,
@order.payments],
3: :header_message => “Sorry…”,
4: :message=> “The following errors occurred with
your cart/order:”) if @order
5: %>