Issue #3090145 by mondrake, andralex, alexpott, amateescu, andypost, longwave: Ensure that mixing array and Attribute objects in theme rendering is managed properly (cherry picked from commit f90ca9bd)