Add assert to suppress warnings as per bug #1115.