Consistently use trailing slashes in empty elements (Fixes #440)