Found the bug: subtask table was global, should be local. Fixed.