Merge "Fix check of debug counts for corrupt frame"