--- wp-includes/kses.php
+++ wp-includes/kses.php
@@ -44,6 +44,12 @@
 if ( ! defined( 'CUSTOM_TAGS' ) )
 	define( 'CUSTOM_TAGS', false );
 
+// Declare these variables with 'global' keyword here.
+// Because they're within an 'if' statement further down, they may
+// under some circumstances not be added to the global namespace (e.g.
+// if using namespaces / autoload in the current PHP environment).
+global $allowedposttags, $allowedtags, $allowedentitynames;
+
 if ( ! CUSTOM_TAGS ) {
 	/**
 	 * Kses global for default allowable HTML tags.
