diff --git a/src/main/src/main/java/org/geoserver/catalog/Catalog.java b/src/main/src/main/java/org/geoserver/catalog/Catalog.java
index 69b40fa..ef3337f 100644
--- a/src/main/src/main/java/org/geoserver/catalog/Catalog.java
+++ b/src/main/src/main/java/org/geoserver/catalog/Catalog.java
@@ -1327,7 +1327,7 @@ public interface Catalog extends CatalogInfo {
      * Returns the style matching a particular name in the specified workspace, or <code>null</code> 
      * if no such style could be found.
      * 
-     * @param workspaceName The name of the workspace containing the style.
+     * @param workspaceName The name of the workspace containing the style, {@code null} stands for a global style.
      * @param name The name of the style to return.
      */
     StyleInfo getStyleByName(String workspaceName, String name);
@@ -1336,17 +1336,20 @@ public interface Catalog extends CatalogInfo {
      * Returns the style matching a particular name in the specified workspace, or <code>null</code> 
      * if no such style could be found.
      * 
-     * @param workspace The workspace containing the style.
+     * @param workspace The workspace containing the style, {@code null} stands for a global style.
      * @param name The name of the style to return.
      */
     StyleInfo getStyleByName(WorkspaceInfo workspace, String name);
     
     /**
-     * Returns the style matching a particular name, or <code>null</code> if
-     * no such style could be found.
+     * Returns the global style matching a particular name, or <code>null</code> if no such style
+     * could be found.
+     * <p>
+     * Note this is a convenient method for {@link #getStyleByName(WorkspaceInfo, String)} with a
+     * {@code null} workspace argument.
+     * </p>
      * 
-     * @param name
-     *                The name of the style to return.
+     * @param name The name of the style to return.
      */
     StyleInfo getStyleByName(String name);
 
diff --git a/src/main/src/main/java/org/geoserver/catalog/impl/CatalogImpl.java b/src/main/src/main/java/org/geoserver/catalog/impl/CatalogImpl.java
index e8e8457..783f848 100644
--- a/src/main/src/main/java/org/geoserver/catalog/impl/CatalogImpl.java
+++ b/src/main/src/main/java/org/geoserver/catalog/impl/CatalogImpl.java
@@ -1148,7 +1148,7 @@ public class CatalogImpl implements Catalog {
     }
 
     public StyleInfo getStyleByName(String name) {
-        return facade.getStyleByName(name);
+        return getStyleByName((WorkspaceInfo) null, name);
     }
 
     public StyleInfo getStyleByName(String workspaceName, String name) {
@@ -1164,25 +1164,12 @@ public class CatalogImpl implements Catalog {
     }
 
     public StyleInfo getStyleByName(WorkspaceInfo workspace, String name) {
-        WorkspaceInfo ws = workspace;
-        
         StyleInfo style = null;
-        if (ws == null) {
-            //first try for a global style
-            style = getStyleByName(name);
-        }
-        if (style != null) {
-            return style;
-        }
-
-        if (ws == null) {
-            //next try default workspace
-            ws = getDefaultWorkspace();
-        }
-        
-        style = facade.getStyleByName(ws, name);
-        if (style == null && workspace == null) {
-            style = facade.getStyleByName(DefaultCatalogFacade.ANY_WORKSPACE, name);
+        if (workspace == null) {
+            //global style
+            style = facade.getStyleByName(name);
+        }else {
+            style = facade.getStyleByName(workspace, name);
         }
         return style;
     }
@@ -1223,17 +1210,15 @@ public class CatalogImpl implements Catalog {
 
         WorkspaceInfo ws = style.getWorkspace();
         StyleInfo existing = getStyleByName( ws, style.getName() );
-        if ( existing != null && !existing.getId().equals( style.getId() )) {
+        if ( existing != null && (isNew || !existing.getId().equals( style.getId() ) )) {
             // null workspace can cause style in any workspace to be returned, check that
             // workspaces match
             WorkspaceInfo ews = existing.getWorkspace();
-            if ((ws == null && ews == null) || (ws != null && ws.equals(ews))) {
-                String msg =  "Style named '" +  style.getName() +"' already exists";
-                if (ws != null) {
-                    msg += " in workspace " + ws.getName();
-                }
-                throw new IllegalArgumentException(msg); 
+            String msg =  "Style named '" +  style.getName() +"' already exists";
+            if (ews != null) {
+                msg += " in workspace " + ews.getName();
             }
+            throw new IllegalArgumentException(msg); 
         }
 
         return postValidate(style, isNew);
diff --git a/src/main/src/main/java/org/geoserver/catalog/impl/DefaultCatalogFacade.java b/src/main/src/main/java/org/geoserver/catalog/impl/DefaultCatalogFacade.java
index 1d9815e..90ca3a0 100644
--- a/src/main/src/main/java/org/geoserver/catalog/impl/DefaultCatalogFacade.java
+++ b/src/main/src/main/java/org/geoserver/catalog/impl/DefaultCatalogFacade.java
@@ -851,8 +851,8 @@ public class DefaultCatalogFacade implements CatalogFacade {
     public StyleInfo getStyleByName(String name) {
         for (Iterator s = styles.iterator(); s.hasNext();) {
             StyleInfo style = (StyleInfo) s.next();
-            if (name.equals(style.getName())) {
-                return ModificationProxy.create(style,StyleInfo.class);
+            if (null == style.getWorkspace() && name.equals(style.getName())) {
+                return ModificationProxy.create(style, StyleInfo.class);
             }
         }
 
diff --git a/src/main/src/test/java/org/geoserver/catalog/impl/CatalogImplTest.java b/src/main/src/test/java/org/geoserver/catalog/impl/CatalogImplTest.java
index 9e8c361..6bee7b8 100644
--- a/src/main/src/test/java/org/geoserver/catalog/impl/CatalogImplTest.java
+++ b/src/main/src/test/java/org/geoserver/catalog/impl/CatalogImplTest.java
@@ -166,7 +166,6 @@ public class CatalogImplTest extends TestCase {
 
     protected void addLayerGroup() {
         addLayer();
-        addStyle();
         catalog.add(lg);
     }
 
@@ -1163,6 +1162,7 @@ public class CatalogImplTest extends TestCase {
     }
 
     public void testAddStyleWithNameConflict() throws Exception {
+        addWorkspace();
         addStyle();
 
         StyleInfo s2 = catalog.getFactory().createStyle();
@@ -1228,10 +1228,11 @@ public class CatalogImplTest extends TestCase {
         s2.setWorkspace(ws);
         catalog.add(s2);
 
-        assertNotNull(catalog.getStyleByName("styleNameWithWorkspace"));
+        assertNull("style is not global, should't have been found",     
+                catalog.getStyleByName("styleNameWithWorkspace"));
         assertNotNull(catalog.getStyleByName(ws.getName(), "styleNameWithWorkspace"));
         assertNotNull(catalog.getStyleByName(ws, "styleNameWithWorkspace"));
-        assertNotNull(catalog.getStyleByName((WorkspaceInfo)null, "styleNameWithWorkspace"));
+        assertNull(catalog.getStyleByName((WorkspaceInfo)null, "styleNameWithWorkspace"));
 
         assertNull(catalog.getStyleByName(ws.getName(), "styleName"));
         assertNull(catalog.getStyleByName(ws, "styleName"));
@@ -1258,8 +1259,8 @@ public class CatalogImplTest extends TestCase {
         s2.setWorkspace(ws2);
         catalog.add(s2);
 
-        //will randomly return one... we should probably return null with multiple matches
-        assertNotNull(catalog.getStyleByName("foo"));
+        //none is global, so none should be returned
+        assertNull(catalog.getStyleByName("foo"));
 
         assertEquals(s1, catalog.getStyleByName(ws.getName(), "foo"));
         assertEquals(s1, catalog.getStyleByName(ws, "foo"));
@@ -1535,8 +1536,7 @@ public class CatalogImplTest extends TestCase {
 
     public void testGetLayerGroupByNameWithWorkspace() {
         addLayer();
-        addStyle();
-
+        
         CatalogFactory factory = catalog.getFactory();
         LayerGroupInfo lg1 = factory.createLayerGroup();
         lg1.setName("lg");
diff --git a/src/main/src/test/java/org/geoserver/config/GeoServerPersisterTest.java b/src/main/src/test/java/org/geoserver/config/GeoServerPersisterTest.java
index 96d240b..f3dabd0 100644
--- a/src/main/src/test/java/org/geoserver/config/GeoServerPersisterTest.java
+++ b/src/main/src/test/java/org/geoserver/config/GeoServerPersisterTest.java
@@ -557,6 +557,8 @@ public class GeoServerPersisterTest extends GeoServerTestSupport {
         assertTrue( f.exists() );
 
         s = catalog.getStyleByName("foostyle");
+        assertNull(s);
+        s = catalog.getStyleByName(catalog.getDefaultWorkspace(), "foostyle");
         catalog.remove(s);
         assertFalse( f.exists() );
     }
