shared/gatt-server: Fix att length check logic