Ported equality test; fixed solution-filling bug