debian package detection - use fast query method and fallback to slower and better, update #1576