Fix incorrect parent selector reference expansion