detect add to table beyond MAX_TABLE_SIZE

Change-Id: I9b1357e583620c59898cd7a649a5b39a6d7e3739
(cherry picked from commit e326b5e06d74685b1853d61c465e5be0b5bf1595)