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