Micro-optimisation - removed duplicate removal of is-open class