Updated to handle inline element false positives.