Fixes #4393 It is far from efficient code. But then again it is easy to understand and I doubt admins will browse it 24/7 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>