Fix tests by working-around deriving issues