fix build: revert isCastErased to public