Fixed collision detection for single table inheritance