[FIX] Various filtering fixes merged from 6.x: [bp/r46816], [bp/r46829], [bp/r47122], [bp/r47136]

git-svn-id: file:///var/local/code.tiki.org/tikisvn/branches/5.x@47179 b456876b-0849-0410-b77d-98878d47e9d5