Fix incorrect setAttribute test

Updated per Ms2ger's review at https://critic.hoppipolla.co.uk/r/1195