It seems that hook_stream_wrappers() is fired earlier than hook_custom_theme() in _drupal_bootstrap_full() and it doesn't care if it's in maintenance mode or not.
It saved me from a pretty edge case in maintenance_mode, i thougth you may find it usefull :)

Comments

ulk200 created an issue.