How to extend custom (non-core) blocks?

I found the solution.

addFilter( 'blocks.registerBlockType ) needs to be called before the call to registerBlockType.