Improve impl package checking