Index: libcfa/src/containers/list.hfa
===================================================================
--- libcfa/src/containers/list.hfa	(revision 6091b88a80edb4c4cb7252c32e95f2e5e44ce514)
+++ libcfa/src/containers/list.hfa	(revision a8ed717b39d5ce90f3791d32ba7c2cae77882555)
@@ -71,10 +71,10 @@
 		// will collapse to single pointer with tag bit
 	};
-	inline void ?{}( $mgd_link(tE) &this, tE* elem ) {
+	static inline void ?{}( $mgd_link(tE) &this, tE* elem ) {
 		(this.elem){ elem };
 		(this.terminator){ 0p };
 		(this.is_terminator){ 0 };
 	}
-	inline void ?{}( $mgd_link(tE) &this, void * terminator ) {
+	static inline void ?{}( $mgd_link(tE) &this, void * terminator ) {
 		(this.elem){ 0p };
 		(this.terminator){ terminator };
@@ -82,5 +82,5 @@
 	}
 	forall ( otype tInit | { void ?{}( $mgd_link(tE) &, tInit); } )
-	void ?=?( $mgd_link(tE) &this, tInit i ) {
+	static inline void ?=?( $mgd_link(tE) &this, tInit i ) {
 		^?{}( this );
 		?{}( this, i );
@@ -93,5 +93,5 @@
 		$mgd_link(tE) prev;
 	};
-	inline void ?{}( $dlinks(tE) &this ) {
+	static inline void ?{}( $dlinks(tE) &this ) {
 		(this.next){ (tE *)0p };
 		(this.prev){ (tE *)0p };
@@ -132,16 +132,46 @@
 	// an empty dlist
 	// links refer to self, making a tight circle
-	void ?{}( dlist(Tnode, Telem) & this ) {
+	static inline void ?{}( dlist(Tnode, Telem) & this ) {
 		$mgd_link(Telem) selfRef = (void *) &this;
 		( this.$links ) { selfRef, selfRef };
 	}
 
-	Telem & ?`first( dlist(Tnode, Telem) &l ) {
+	static inline Telem & ?`first( dlist(Tnode, Telem) &l ) {
 		return * l.$links.next.elem;
 	}
 
-	Telem & ?`last( dlist(Tnode, Telem) &l ) {
+	static inline Telem & ?`last( dlist(Tnode, Telem) &l ) {
 		return * l.$links.prev.elem;
 	}
+
+	#if !defined(NDEBUG) && (defined(__CFA_DEBUG__) || defined(__CFA_VERIFY__))
+	static bool $validate_fwd( dlist(Tnode, Telem) & this ) {
+		Tnode * it = & $tempcv_e2n( this`first );
+		if (!it) return (& this`last == 0p);
+
+		while( $next_link(*it).elem ) {
+			it = & $tempcv_e2n( * $next_link(*it).elem );
+		}
+
+		return ( it == & $tempcv_e2n( this`last ) ) &&
+			   ( $next_link(*it).is_terminator ) &&
+			   ( ((dlist(Tnode, Telem)*)$next_link(*it).terminator) == &this );
+	}
+	static bool $validate_rev( dlist(Tnode, Telem) & this ) {
+		Tnode * it = & $tempcv_e2n( this`last );
+		if (!it) return (& this`first == 0p);
+
+		while( $prev_link(*it).elem ) {
+			it = & $tempcv_e2n( * $prev_link(*it).elem );
+		}
+
+		return ( it == & $tempcv_e2n( this`first ) ) &&
+			   ( $prev_link(*it).is_terminator ) &&
+			   ( ((dlist(Tnode, Telem)*)$prev_link(*it).terminator) == &this );
+	}
+	static bool validate( dlist(Tnode, Telem) & this ) {
+		return $validate_fwd(this) && $validate_rev(this);
+	}
+	#endif
 
 	static inline void insert_after(Tnode &list_pos, Telem &to_insert) {
@@ -152,5 +182,5 @@
 		assert($next_link(singleton_to_insert).elem == 0p);
 		$prev_link(singleton_to_insert) = & $tempcv_n2e(list_pos);
-		$next_link(singleton_to_insert) = $next_link(list_pos).elem;
+		$next_link(singleton_to_insert) = $next_link(list_pos);
 		if ($next_link(list_pos).is_terminator) {
 			dlist(Tnode, Telem) *list = $next_link(list_pos).terminator;
@@ -175,5 +205,5 @@
 		assert($next_link(singleton_to_insert).elem == 0p);
 		$next_link(singleton_to_insert) = & $tempcv_n2e(list_pos);
-		$prev_link(singleton_to_insert) = $prev_link(list_pos).elem;
+		$prev_link(singleton_to_insert) = $prev_link(list_pos);
 		if ($prev_link(list_pos).is_terminator) {
 			dlist(Tnode, Telem) *list = $prev_link(list_pos).terminator;
