scripts: fix event:get_data() usage in apply-profile
event:set_data() coerces Lua tables to properties, so that keys and values become strings. Take into account that profile.index is a string due to this.
Fixes WP setting the profile, even though it is already the active one.