Target: Replace getSection().empty() with hasSection()

No functional change, just a small cleanup.