Revert "Remove safe assert checking for shape managers"
This reverts commit 899b02999e8146dd639f1bc1994b6632894f73cd.