BUG Fixed inverse logic in getInheritedGlobalBlocks 

Fixed inverse logic in getInheritedGlobalBlocks that was filtering excluded blocks instead of excluding them.

Added PHPDoc and removed some redundant code and slight code cleanup.