Removed a wrong assertion. Fixes #2079.