move debug record size assertion to correct position