ERT-745: Add protection against alias -> alias