fixed nasty overlay detection bug in poly2bitmap