Fixes #1149: Filter out already included javascript files requested via ajax.