There are some basic rules of Priority, that all compound structures follow, when joining together.

1) The higher priority layers always take precedent. For example, a Priority 1 layer will barge it’s way through lower priority layers in order to join up to another Priority 1 layer.

2) Lower priority layers cannot cut through higher priority layers, during the “clean up process”- they are just stopped by them.

3) The exception to both of the above are layers that fall within the Core boundaries. A priority 2 layer “within the core boundaries” will override a priority 1 later” that is situated “outside of the core boundary”.

Tip via
Walls: Applying Functions to Compound Layers:

Image from Revit Zone

This has been reposted from http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=13778933&linkID=9273944&CMP=OTC-RSSSUP01

Published date: 2009-Aug-21 ID: DL13778933
Applies to:
Autodesk® Revit® Architecture 2010
Autodesk® Revit® MEP 2010
Autodesk® Revit® Structure 2010

revit_2010_wallmodification_hotfix_x32.zip (zip – 7584Kb)

revit_2010_wallmodification_hotfix_x64.zip (zip – 10224Kb)

revit_2010_hotfix_wall_modifcations_readme.htm (htm – 58Kb)
This hotfix addresses issues related to deleting or modifying walls, a crash may occur.
Make sure to download the correct patch for your operating system (32 or 64 bit).
The Readme contains the latest information regarding the installation and use of this update. It is strongly recommended that you read the entire document before you apply the update to your product. For your reference, you should save the Readme to your hard drive or print a copy.