Add recalculatePermissions message and stacktrace to debug logging