Masks for first-level shapes are back for new API.

May be we should wait and merge it manually into split files, let it hang here just for the record.