[#30777] Removes html elements used in the wrong context (Fix #1079)
Reordering the where clause in similar tags

Reordering the where clause so m.tag_id is before t.access. Should be a bit better performancewise.