Issue #2316739 by eshta: Prevent excessive first-child added generating selector