Only enter one solution when the two solutions are equal

Fix for #46282