Fix for task #143. Changed assertion to semantic equality.