Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5259)
+++ /CKEditor/trunk/CHANGES.html	(revision 5260)
@@ -81,4 +81,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5190">#5190</a> : Template entry should not gain initial focus in templates list dialog.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5238">#5238</a> : Menu button doesn't display arrow icon in high-contrast mode.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3576">#3576</a> : Non-attributed element of the same name with the applied style is correctly removed.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5259)
+++ /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5260)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -929,29 +929,26 @@
 	{
 		var def = style._.definition,
-			attributes = def.attributes,
+			attributes = CKEDITOR.tools.extend( {}, def.attributes, getOverrides( style )[ element.getName() ] ),
 			styles = def.styles,
-			overrides = getOverrides( style );
-
-		function removeAttrs()
-		{
-			for ( var attName in attributes )
-			{
-				// The 'class' element value must match (#1318).
-				if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] )
-					continue;
-				element.removeAttribute( attName );
-			}
-		}
+			// If the style is only about the element itself, we have to remove the element.
+			removeEmpty = CKEDITOR.tools.isEmpty( attributes ) && CKEDITOR.tools.isEmpty( styles );
 
 		// Remove definition attributes/style from the elemnt.
-		removeAttrs();
+		for ( var attName in attributes )
+		{
+			// The 'class' element value must match (#1318).
+			if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] )
+				continue;
+			removeEmpty = element.hasAttribute( attName );
+			element.removeAttribute( attName );
+		}
+
 		for ( var styleName in styles )
+		{
+			removeEmpty = removeEmpty || !!element.getStyle( styleName );
 			element.removeStyle( styleName );
-
-		// Now remove override styles on the element.
-		attributes = overrides[ element.getName() ];
-		if ( attributes )
-			removeAttrs();
-		removeNoAttribsElement( element );
+		}
+
+		removeEmpty && removeNoAttribsElement( element );
 	}
 
