did they find out by x-raying your bags, or did you volunteer when they asked?
my experience is that they always ask, but don't really enforce/check. i accidentally left a spare laptop battery in my bag for a year or so, and it went all around Asia. guess i'm lucky i didn't cause a disastrous crash.