filter allowed `when` alternatives in front-end

Signed-off-by: Mattias Andrée <maandree@operamail.com>