Fix PIPELINE_STAGE_TOP_OF_PIPE_BIT usage in api tests