Fix for #4736 -- preserve case of defined resources
This restricts the change introduced in #4691 to hostclasses, and leaves defined
resources and nodes alone, thus more closely mimicing the 0.25.x behaviour. It
also includes title, as this was similarly affected.