Improved allowed_stb_types filter, added strict_stb_type_check option (issue #2520)