Add stack detect functionality for RED Brick as master of stack