Mixed magnetism in magnetocaloric materials with first-order and second-order magnetoelastic transitions