JCR-2355: Add a debug message in the asserts that fail