Fixed execution order of setup/teardown

Multiple setup and teardown operations in the same context would execute in the
reverse order.