Fix caps check again

One more pass at fixing this bug, correctly this time.