Partial revert of d9fbd270

Reverted the logic change, and updated the tests to correctly fail.
AssertionError exception should not be rethrown, has they can occur during
normal presentation compiler operation.

Fixes #1002355
Merge pull request #876 from skyluc/issue/AssertionErrors-1002355

Partial revert of d9fbd270