Fix casing issues with the element.before/after tags

The code is toLower'd, but the if statements weren't! My bad.