Adding a new block type to Matrix causes subfields and subfields of other block types to disappear When saving a newly added block type with subfields to an existing Matrix, the subfields of the new block type are gone and also are the subfields of 6 of the last block types. The whole Matrix contains 29 block types.

I'm using Craft CMS 2.6.2982.
Bumping php.ini's max_input_vars to a higher value as described in the answer here fixed it.