Fix disabled attribute check.
Fixes #3818