Bug #1007: Fix the console getting key focus even if it's not visible when a reference becomes unavailable